This works just fine, as also previously tested/proven by
ve.cloneObject, which uses the same concept of creating an object
identical to what invoking the constructor with "new" would do,
but without invoking the constructor function (which has side-
effects).
Except in this case we do invoke the constructor function, but
we can't use new in ve.Factory because of the arbitrary number of
arguments.
Added a test to assert that 3+ arguments and that instanceof
work as expected.
Change-Id: If0add3da7475886e476900044acda2ba7d01fb11
Add some missing constructor names and rename the ones with a
lowercase 'v'.
I previously changed Object.create and others to using hasOwn,
but that turned out to be useless. The thought at the time was
to only use the native one if it really is a native one (and not
a polyfill from another script), however in then hasOwn is only
relevant on prototypes and when negated. For static members it
would be an own-property either way.
Follows-up:
* Id6783fcfc35a896db088ff424ff9faaabcaff716 (metanode)
* Iab763954fb8cf375900d7a9a92dec1c755d5407e (object-management)
Change-Id: Ia6ef597e5e5453277472dfc23f25d2878b68b7f6
I think what happened here is I added the skeleton code, Kranitor came through and removed the unused arguments, then I merged in my implementations without pulling, then pushed - git merged cleanly, the arguments I thought were there were not there, and tests broke.
Change-Id: I5aa2968fef164c774a10db83a6df1753c93cd2dc
Specifically, go to [[mw:VisualEditor/Feedback]] rather than [[mw:Visual editor/
Feedback]], as the primary set of pages on MWwiki have been moved some time ago
and right now we're stranding users' feedback messages at the wrong place.
Change-Id: Ia2ba0dad7d1bf0d1633fe2704a2e8354285c66da
This allowed me to move ve.ce.Surface particulars (such as the starting, stopping and clearing of polling) out of the UI code.
Also cleaned up some switch statements.
Change-Id: I7b85e42a4e01f8d76237d995e25275f2424541ea
Previously, we were looking one offset to the left to load the insertAnnotations. This would fail at the beginning of a document that began with a slug, and probably other cases too. Now using getRelativeContent offset.
Change-Id: I31b24e2ccfa9fda2ce7fb19d1221f8708a96083f
Slugs aren't represented in the model at all, but in the DOM they do
contain a single character ( or ), so we have to override
the return value of getDomText() to be empty.
Change-Id: Ic93cb694b0632bc81d8d0749149e4d739232ed48
Iterating forwards while removing from an array is a good way to get half way there and be confused as hell.
Change-Id: I74db84eee87c73d8e035f6dc8a92be0d0b9b3dad
* Added some new icons (to be used soon in the inspector redesign)
* Added right-to-left icons for lists
* Renamed some icons for future RTL use
Change-Id: I10e3e3fcda82786e3064176e7eefe211b88db95c
Was cloning the original set, then adding to it - resulting in always containing the whole set in any match.
Also using test instead of exec since exec returns a string result, which under strange circumstances could return a falsy result, despite the RegExp finding a match.
Change-Id: I09a7cb264521d58f02d6ff2547edad9a740b23b2