mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
3bcac07aab
Turns out, the context property of a jQuery selection isn't always there. For example: $( 'body' ).context === document $( '<div>' ).context === undefined Even if you later attach that div, so long as you have the old selection around, the cached `context` property won't magically be updated. This makes sense (although it's poorly documented in the jQuery API) but causes issues for us, and pretty much makes the context property useless. Instead, we can just use the standard `ownerDocument` property, available on all DOM elements. This change also add support for passing in a DOM element directly, in addition to the existing support of passing jQuery or Document objects in. Change-Id: Ib8a31b74f2a4f455b1318be9f5c7805a2a193c79 |
||
---|---|---|
.. | ||
actions | ||
ce | ||
dm | ||
init | ||
styles | ||
test | ||
ui | ||
ve.Action.js | ||
ve.ActionFactory.js | ||
ve.BranchNode.js | ||
ve.CommandRegistry.js | ||
ve.debug.js | ||
ve.Document.js | ||
ve.EventEmitter.js | ||
ve.Factory.js | ||
ve.js | ||
ve.LeafNode.js | ||
ve.NamedClassFactory.js | ||
ve.Node.js | ||
ve.Range.js | ||
ve.Registry.js | ||
ve.Surface.js | ||
ve.Trigger.js | ||
ve.TriggerRegistry.js |