diff --git a/split/ui-events.bs b/split/ui-events.bs index d7a4fd9..b66cde1 100644 --- a/split/ui-events.bs +++ b/split/ui-events.bs @@ -534,731 +534,6 @@ with the following supplemental additions: 4All other default actions, including the activation behavior -

Legacy {{MutationEvent}} events

- - The mutation and mutation name event modules are designed to allow - notification of any changes to the structure of a document, including - attribute, text, or name modifications. - -

- None of the event types associated with the {{MutationEvent}} interface are - designated as cancelable. This stems from the fact that it is very difficult - to make use of existing DOM interfaces which cause document modifications if - any change to the document might or might not take place due to cancelation - of the resulting event. Although this is still a desired capability, it was - decided that it would be better left until the addition of transactions into - the DOM. -

- - Many single modifications of the tree can cause multiple mutation events to - be dispatched. Rather than attempt to specify the ordering of mutation - events due to every possible modification of the tree, the ordering of these - events is left to the implementation. - -
-

- The {{MutationEvent}} interface was introduced in DOM Level 2 Events, but - has not yet been completely and interoperably implemented across user - agents. In addition, there have been critiques that the interface, as - designed, introduces a performance and implementation challenge. -

-

- DOM4 [[!DOM]] provides a new mechanism using a - MutationObserver interface which addresses the use cases that - mutation events solve, but in a more performant manner. Thus, this - specification describes mutation events for reference and completeness of - legacy behavior, but deprecates the use of the {{MutationEvent}} - interface. -

-
- -

Interface MutationEvent

- -

Introduced in DOM Level 2, deprecated in this - specification

- - The MutationEvent interface provides specific contextual - information associated with Mutation events. - - To create an instance of the MutationEvent interface, use - the {{Document/createEvent()}} method call. - -
-		[Exposed=Window]
-		interface MutationEvent : Event {
-			// attrChangeType
-			const unsigned short MODIFICATION = 1;
-			const unsigned short ADDITION = 2;
-			const unsigned short REMOVAL = 3;
-
-			readonly attribute Node? relatedNode;
-			readonly attribute DOMString prevValue;
-			readonly attribute DOMString newValue;
-			readonly attribute DOMString attrName;
-			readonly attribute unsigned short attrChange;
-
-			undefined initMutationEvent(DOMString typeArg,
-				optional boolean bubblesArg = false,
-				optional boolean cancelableArg = false,
-				optional Node? relatedNodeArg = null,
-				optional DOMString prevValueArg = "",
-				optional DOMString newValueArg = "",
-				optional DOMString attrNameArg = "",
-				optional unsigned short attrChangeArg = 0);
-		};
-		
- -
-
MODIFICATION
-
- The Attr was modified in place. -
- -
ADDITION
-
- The Attr was just added. -
- -
REMOVAL
-
- The Attr was just removed. -
- -
relatedNode
-
- relatedNode MUST be used to identify a secondary - node related to a mutation event. For example, if a mutation - event is dispatched to a node indicating that its parent has - changed, the relatedNode will be the changed - parent. If an event is instead dispatched to a subtree - indicating a node was changed within it, the - relatedNode MUST be the changed node. In the case - of the DOMAttrModified event, it indicates the - Attr node which was modified, added, or removed. - - The un-initialized value of this attribute MUST be - null. -
- -
prevValue
-
- prevValue indicates the previous value of the - Attr node in DOMAttrModified events, and of - the CharacterData node in - DOMCharacterDataModified events. - - The un-initialized value of this attribute MUST be - "" (the empty string). -
- -
newValue
-
- newValue indicates the new value of the - Attr node in DOMAttrModified events, and of - the CharacterData node in - DOMCharacterDataModified events. - - The un-initialized value of this attribute MUST be - "" (the empty string). -
- -
attrName
-
- attrName indicates the name of the changed - Attr node in a DOMAttrModified event. - - The un-initialized value of this attribute MUST be - "" (the empty string). -
- -
attrChange
-
- attrChange indicates the type of change which - triggered the DOMAttrModified event. The values can be - MODIFICATION, ADDITION, or - REMOVAL. - - The un-initialized value of this attribute MUST be - 0. - -

- There is no defined constant for the attrChange value of 0 (the - un-initialized value). -

-
- -
initMutationEvent(typeArg)
-
- Initializes attributes of a MutationEvent object. - This method has the same behavior as {{Event/initEvent()}}. - -
-
DOMString typeArg
-
- Refer to the {{Event/initEvent()}} method for a description of this parameter. -
- -
boolean bubblesArg
-
- Refer to the {{Event/initEvent()}} method for a description of this parameter. -
- -
boolean cancelableArg
-
- Refer to the {{Event/initEvent()}} method for a description of this parameter. -
- -
Node? relatedNodeArg
-
- Specifies {{MutationEvent}}.relatedNode. -
- -
DOMString prevValueArg
-
- Specifies {{MutationEvent}}.prevValue. This value MAY be the empty string. -
- -
DOMString newValueArg
-
- Specifies {{MutationEvent}}.newValue. - This value MAY be the empty string. -
- -
DOMString attrNameArg
-
- Specifies {{MutationEvent}}.attrName. - This value MAY be the empty string. -
- -
unsigned short attrChangeArg
-
- Specifies {{MutationEvent}}.attrChange. - This value MAY be 0. -
-
-
-
- -

Legacy {{MutationEvent}} event types

- - The mutation event types are listed below. - -

DOMAttrModified

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMAttrModified
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesYes
Trusted TargetsElement
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - element whose attribute is being modified
  • -
  • {{MutationEvent}}.attrName : - the name of the changed Attr node
  • -
  • {{MutationEvent}}.attrChange : - the numerical code corresponding to the most applicable attrChangeType
  • -
  • {{MutationEvent}}.relatedNode : - the Attr node that has been modified, added, or removed.
  • -
  • {{MutationEvent}}.newValue : - new value of the attribute, if the Attr node has been added or modified
  • -
  • {{MutationEvent}}.prevValue : - previous value of the attribute, if the Attr node has been removed or modified
  • -
-
- - A user agent MUST dispatch this event after an - Attr.value has been modified and after an - Attr node has been added to or removed from an - Element. The event target of this event MUST be - the Element node where the change occurred. It is - implementation dependent whether this event type occurs when the - children of the Attr node are changed in ways that do - not affect the value of Attr.value. - -

- The DOMAttrModified event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMCharacterDataModified

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMCharacterDataModified
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesYes
Trusted TargetsText, Comment, ProcessingInstruction
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - object whose content is being modified
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - parent node of the object whose content is being modified
  • -
  • {{MutationEvent}}.newValue : - new value of the object
  • -
  • {{MutationEvent}}.prevValue : - previous value of the object
  • -
-
- - A user agent MUST dispatch this event after - CharacterData.data or - ProcessingInstruction.data have been modified, but the - node itself has not been inserted or deleted. The event - target of this event MUST be the CharacterData node - or the ProcessingInstruction node. - -

- The DOMCharacterDataModified event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMNodeInserted

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMNodeInserted
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesYes
Trusted TargetsElement, Attr, Text, Comment, DocumentType, - ProcessingInstruction
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - element which is being inserted
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - parent node of the node that has been inserted, or the ownerElement in the case of Attr nodes
  • -
  • {{MutationEvent}}.newValue : - the empty string
  • -
  • {{MutationEvent}}.prevValue : - the empty string
  • -
-
- - A user agent MUST dispatch this event type when a node other - than an Attr node has been added as a child of another - node. A user agent MAY dispatch this event when an - Attr node has been added to an Element - node (see note below). This - event MUST be dispatched after the insertion has taken place. The - event target of this event MUST be the node being inserted. - -

- For detecting attribute insertion, use the DOMAttrModified - event type instead. -

- -

- The DOMNodeInserted event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMNodeInsertedIntoDocument

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMNodeInsertedIntoDocument
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesNo
Trusted TargetsElement, Attr, Text, Comment, DocumentType, - ProcessingInstruction
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - element which is being inserted
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - parent node of the node that has been inserted, or the ownerElement in the case of Attr nodes
  • -
  • {{MutationEvent}}.newValue : - the empty string
  • -
  • {{MutationEvent}}.prevValue : - the empty string
  • -
-
- - A user agent MUST dispatch this event when a node has been - inserted into a document, either through direct insertion of the - node or insertion of a subtree in which it is contained. A user - agent MAY treat an Attr node as part of an - Element's subtree. This event MUST be dispatched after - the insertion has taken place. The event target of this event - MUST be the node being inserted. If the node is being directly - inserted, the event type DOMNodeInserted MUST occur before - this event type. - -

- The DOMNodeInsertedIntoDocument event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMNodeRemoved

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMNodeRemoved
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesYes
Trusted TargetsElement, Attr, Text, Comment, DocumentType, - ProcessingInstruction
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - element which is being removed
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - the parent node of the node being removed, or the ownerElement in the case of Attr nodes
  • -
  • {{MutationEvent}}.newValue : - the empty string
  • -
  • {{MutationEvent}}.prevValue : - the empty string
  • -
-
- - A user agent MUST dispatch this event when a node other than - an Attr node is being removed from its parent node. A - user agent MAY dispatch this event when an Attr - node is being removed from its ownerElement (see note below). This event MUST be - dispatched before the removal takes place. The event target - of this event MUST be the node being removed. - -

- For reliably detecting attribute removal, use the - DOMAttrModified event type instead. -

- -

- The DOMNodeRemoved event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMNodeRemovedFromDocument

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMNodeRemovedFromDocument
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesNo
Trusted TargetsElement, Attr, Text, Comment, DocumentType, - ProcessingInstruction
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - element which is being removed
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - the parent node of the node being removed, or the ownerElement in the case of Attr nodes
  • -
  • {{MutationEvent}}.newValue : - the empty string
  • -
  • {{MutationEvent}}.prevValue : - the empty string
  • -
-
- - A user agent MUST dispatch this event when a node is being - removed from a document, either through direct removal of the node - or removal of a subtree in which it is contained. A user - agent MAY treat an Attr node as part of an - Element's subtree. This event MUST be dispatched before - the removal takes place. The event target of this event type - MUST be the node being removed. If the node is being directly - removed, the event type DOMNodeRemoved MUST occur before this - event type. - -

- For reliably detecting attribute removal, use the - DOMAttrModified event type instead. -

- -

- The DOMNodeRemovedFromDocument event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

- -

DOMSubtreeModified

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TypeDOMSubtreeModified
Interface{{MutationEvent}}
Sync / AsyncSync
BubblesYes
Trusted TargetsWindow, Document, DocumentFragment, Element, Attr -
CancelableNo
ComposedNo
Default actionNone
Context
(trusted events)
-
    -
  • {{Event}}.{{Event/target}} : - parent node of subtree being modified
  • -
  • {{MutationEvent}}.attrName : - the empty string
  • -
  • {{MutationEvent}}.attrChange : - 0
  • -
  • {{MutationEvent}}.relatedNode : - null
  • -
  • {{MutationEvent}}.newValue : - the empty string
  • -
  • {{MutationEvent}}.prevValue : - the empty string
  • -
-
- - This is a general event for notification of all changes to the - document. It can be used instead of the more specific mutation and - mutation name events. It MAY be dispatched after a single - modification to the document or, at the implementation's discretion, - after multiple changes have occurred. The latter case SHOULD - generally be used to accommodate multiple changes which occur either - simultaneously or in rapid succession. The target of this event MUST - be the lowest common parent of the changes which have taken place. - This event MUST be dispatched after any other events caused by the - mutation(s) have occurred. - -

- The DOMSubtreeModified event type is defined in this - specification for reference and completeness, but this specification - deprecates the use of this event type. -

Legacy Event Initializers

@@ -1276,9 +551,9 @@ with the following supplemental additions: fully initialize an event.
- Initializing all the attributes of a MutationEvent requires calls to two + Initializing all the attributes of a UIEvent requires calls to two initializer methods: initEvent and - initMutationEvent. + initUIEvent.
Due in part to the length of time in the development of this standard, some