diff --git a/source b/source index a3e9f00c905..652d5cf537a 100644 --- a/source +++ b/source @@ -2172,14 +2172,6 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d must operate on the actual underlying data, not a snapshot of the data.

-

In the contexts of events, the terms fire and dispatch are used as defined in the - WHATWG DOM standard: firing an event means to create and - dispatch it, and dispatching an event means to follow the steps that propagate - the event through the tree. The term trusted event is - used to refer to events whose isTrusted attribute is - initialized to true.

-

Plugins

@@ -3155,15 +3147,19 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
  • The data of a text node
  • Event interface
  • EventTarget interface
  • +
  • The fire an event algorithm +
  • The dispatch algorithm
  • EventInit dictionary type
  • +
  • type attribute
  • target attribute
  • currentTarget attribute
  • +
  • bubbles attribute
  • +
  • cancelable attribute
  • isTrusted attribute
  • initEvent() method
  • addEventListener() method
  • The type of an event
  • The concept of an event listener and the event listeners associated with an EventTarget
  • -
  • The concept of a target override
  • The encoding (herein the character encoding) and content type of a Document
  • @@ -8765,7 +8761,7 @@ partial interface Document { data-x="">loading" if the document is associated with an HTML parser, an XML parser, or an XSLT processor, and to the string "complete" otherwise. Various algorithms during page loading affect this value. When the value is set, the - user agent must fire a simple event named fire an event named readystatechange at the Document object.

    A Document is said to have an active parser if it is associated with an @@ -31979,12 +31975,10 @@ interface HTMLMediaElement : HTMLElement {

  • If enable is true, then enable this audio track, otherwise, do not enable this audio track.

  • -
  • Fire a trusted event with the name addtrack, that does not bubble and is not cancelable, - and that uses the TrackEvent interface, with the track attribute initialized to the new - AudioTrack object, at this AudioTrackList object.

  • +
  • Fire an event named addtrack at this AudioTrackList object, + using TrackEvent, with the track + attribute initialized to the new AudioTrack object.

  • @@ -32028,12 +32022,10 @@ interface HTMLMediaElement : HTMLElement { are unselected, then a change event will be fired.

    -
  • Fire a trusted event with the name addtrack, that does not bubble and is not cancelable, - and that uses the TrackEvent interface, with the track attribute initialized to the new - VideoTrack object, at this VideoTrackList object.

  • +
  • Fire an event named addtrack at this VideoTrackList object, + using TrackEvent, with the track + attribute initialized to the new VideoTrack object.

  • @@ -32647,16 +32639,21 @@ interface HTMLMediaElement : HTMLElement {

    If at any time the user agent learns that an audio or video track has ended and all media data relating to that track corresponds to parts of the media timeline that are before the earliest possible position, the user agent may queue a - task to first remove the track from the audioTracks - attribute's AudioTrackList object or the videoTracks attribute's VideoTrackList object as - appropriate and then fire a trusted event with the name removetrack, that does not bubble and is not cancelable, and that - uses the TrackEvent interface, with the track attribute initialized to the AudioTrack or - VideoTrack object representing the track, at the media element's - aforementioned AudioTrackList or VideoTrackList object.

    + task to run these steps:

    + +
      +
    1. Remove the track from the audioTracks + attribute's AudioTrackList object or the videoTracks attribute's VideoTrackList object + as appropriate.

    2. + +
    3. Fire an event named removetrack at the media element's + aforementioned AudioTrackList or VideoTrackList object, using + TrackEvent, with the track attribute + initialized to the AudioTrack or VideoTrack object representing the + track.

    4. +

    The duration attribute must return the time of the end of the media resource, in seconds, on the media timeline. If @@ -34947,13 +34944,11 @@ interface VideoTrack {

  • Add the new text track to the media element's list of text tracks.

  • -
  • Fire a trusted event with the name addtrack, that does not bubble and is not cancelable, and that uses - the TrackEvent interface, with the track - attribute initialized to the text track's TextTrack object, at the - media element's textTracks attribute's - TextTrackList object.

  • +
  • Fire an event named addtrack at the media element's textTracks attribute's TextTrackList object, + using TrackEvent, with the track + attribute initialized to the text track's TextTrack object.

  • @@ -35028,24 +35023,20 @@ interface VideoTrack {

    When a track element's parent element changes and the new parent is a media element, then the user agent must add the track element's corresponding text track to the media element's list of text tracks, and - then queue a task to fire a trusted event with the name addtrack, that does not bubble and is not cancelable, and that uses - the TrackEvent interface, with the track - attribute initialized to the text track's TextTrack object, at the - media element's textTracks attribute's - TextTrackList object.

    + then queue a task to fire an event named + addtrack at the media element's textTracks attribute's TextTrackList object, + using TrackEvent, with the track attribute + initialized to the text track's TextTrack object.

    When a track element's parent element changes and the old parent was a media element, then the user agent must remove the track element's corresponding text track from the media element's list of text tracks, - and then queue a task to fire a trusted event with the name removetrack, that does not bubble and is not cancelable, and that - uses the TrackEvent interface, with the track attribute initialized to the text track's - TextTrack object, at the media element's textTracks attribute's TextTrackList object.

    + and then queue a task to fire an event named + removetrack at the media element's + textTracks attribute's TextTrackList + object, using TrackEvent, with the track + attribute initialized to the text track's TextTrack object.


    @@ -35577,14 +35568,11 @@ interface TextTrack : EventTarget {
  • -

    Queue a task to fire a trusted event with the name addtrack, that does not bubble and is not cancelable, and - that uses the TrackEvent interface, with the track attribute initialized to the new text - track's TextTrack object, at the media element's textTracks attribute's TextTrackList - object.

    +

    Queue a task to fire an event named + addtrack at the media element's textTracks attribute's TextTrackList object, + using TrackEvent, with the track + attribute initialized to the new text track's TextTrack object.

  • @@ -43655,8 +43643,9 @@ interface HTMLInputElement : HTMLElement { "rtl" if the user selected a right-to-left writing direction.

    -
  • Queue a task to fire a simple event that bubbles named input at the input element.

  • +
  • Queue a task to fire an event named + input at the input element, with the bubbles attribute initialized to true.

  • @@ -45668,10 +45657,13 @@ ldh-str = < as defined in checkedness and the element's indeterminate IDL attribute back to the values they had before the pre-click activation steps were run. The activation behavior - is to fire a simple event that bubbles named input at the element and then fire a simple event - that bubbles named change at the element.

    + is to fire an event named input at the element, with the bubbles attribute initialized to true, and then fire an event named change + at the element, with the bubbles attribute initialized to + true.

    +

    If the element is not mutable, it has no activation behavior.

    @@ -45834,10 +45826,13 @@ ldh-str = < as defined in
    checkedness to false. The activation behavior for - R is to fire a simple event that bubbles named input at R and then fire a simple event - that bubbles named change at R.

    + R is to fire an event named input at R, with the bubbles attribute initialized to true, and then fire an event named change + at R, with the bubbles attribute initialized to + true.

    +

    +
  • Let build be the result of firing an + event named show at menu, using + RelatedEvent, with the cancelable + attribute initialized to true and the relatedTarget attribute initialized to the + button element.

  • + -
  • If the event is not canceled, then build and +

  • If build is true, then build and show the menu for menu, with the button element as the subject.

  • @@ -48524,14 +48531,24 @@ interface HTMLSelectElement : HTMLElement { user agent must send select update notifications.

    When the user agent is to send select update notifications, queue - a task to first fire a simple event that bubbles named input at the select element, and then fire a simple - event that bubbles named change at the - select element, using the user interaction task source as the task - source. If the JavaScript execution context stack was not empty when the user agent - was to send select update notifications, then the resulting input and change events must not be - trusted.

    + a task, using the user interaction task source, to run these steps:

    + +
      +
    1. Let isTrusted be false, if the JavaScript execution context stack + is not empty, and true otherwise.

    2. + +
    3. Fire an event named input at the select element, with the bubbles attribute initialized to true and the isTrusted attribute initialized to + isTrusted.

    4. + +
    5. Fire an event named change at the select element, with the bubbles attribute initialized to true and the isTrusted attribute initialized to + isTrusted.

    6. +

    The reset algorithm for select elements is to go through all the option elements in the element's HTMLTextAreaElement : HTMLElement { should allow the user to edit, insert, and remove text, and to insert and remove line breaks in the form of U+000A LINE FEED (LF) characters. Any time the user causes the element's raw value to change, the user agent must queue a - task to fire a simple event that bubbles named input at the textarea element. User agents may wait for a - suitable break in the user's interaction before queuing the task; for example, a user agent could - wait for the user to have not hit a key for 100ms, so as to only fire the event when the user - pauses, instead of continuously for each keystroke.

    + task to fire an event named input at the textarea element, with the bubbles attribute initialized to true. User agents may wait for + a suitable break in the user's interaction before queuing the task; for example, a user agent + could wait for the user to have not hit a key for 100ms, so as to only fire the event when the + user pauses, instead of continuously for each keystroke.

    +

    A textarea element has a dirty value flag, which must be initially set to false, and must be set to true whenever the user @@ -49478,8 +49496,9 @@ interface HTMLTextAreaElement : HTMLElement { "rtl" if the user selected a right-to-left writing direction.

    -
  • Queue a task to fire a simple event that bubbles named input at the textarea element.

  • +
  • Queue a task to fire an event named + input at the textarea element, with the bubbles attribute initialized to true.

  • @@ -53690,9 +53709,10 @@ MIT Room 32-G524

    The select() method must cause the contents of the text control to be fully selected, with the selection direction being none, if the platform support selections with the direction none, or otherwise forward. The user - agent must then queue a task to fire a simple event that bubbles named - select at the element, using the user interaction task - source as the task source.

    + agent must then queue a task, using the user interaction task source, to + fire an event named select at the element, with the bubbles attribute initialized to true.

    In the case of input elements, if the control has no selectable text, then the method must do nothing.

    @@ -53768,9 +53788,10 @@ MIT Room 32-G524 platform does not support selections with the direction none, and none otherwise (including if the argument is omitted).

    -
  • Queue a task to fire a simple event that bubbles named select at the element, using the user interaction task - source as the task source.

  • +
  • Queue a task, using the user interaction task source, to fire an event named select + at the element, with the bubbles attribute initialized to + true.

  • @@ -53904,9 +53925,10 @@ MIT Room 32-G524 -
  • Queue a task to fire a simple event that bubbles named select at the element, using the user interaction task - source as the task source.

  • +
  • Queue a task, using the user interaction task source, to fire an event named select + at the element, with the bubbles attribute initialized to + true.

  • @@ -54101,12 +54123,12 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD in tree order, run the following substeps:

      +
    1. Let notCanceled be the result of firing an + event named invalid at field, with the + cancelable attribute initialized to true.

    2. -
    3. Fire a simple event named invalid that - is cancelable at field.

    4. - -
    5. If the event was not canceled, then add field to unhandled invalid controls.

    6. - +
    7. If notCanceled is true, then add field to unhandled invalid + controls.

    @@ -54393,10 +54415,18 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD invoked, must run these steps:

      -
    1. If this element is a candidate for constraint validation and does not satisfy its constraints, then fire a simple event - named invalid that is cancelable (though canceling has no - effect) at this element and return false.

      +
    2. +

      If this element is a candidate for constraint validation and does not satisfy its constraints, then:

      + +
        +
      1. Fire an event named invalid at this element, with the cancelable attribute initialized to true (though canceling + has no effect).

      2. + +
      3. Return false.

      4. +
    3. Return true.

    @@ -54410,17 +54440,18 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD data-x="concept-fv-valid">satisfy its constraints, then:
      -
    1. Fire a simple event named invalid that - is cancelable at this element.

    2. - -
    3. If that event is not canceled, report the problems with the constraints of this element - to the user. When reporting the problem with the constraints to the user, the user agent may - run the focusing steps for this element, and may change the scrolling position of - the document, or perform some other action that brings this element to the user's attention. - User agents may report more than one constraint violation, if this element suffers from - multiple problems at once. If this element is not being rendered, then the user - agent may, instead of notifying the user, report the error for the running - script.

      +
    4. Let report be the result of firing an + event named invalid at this element, with the cancelable attribute initialized to true.

    5. + +
    6. If report is true, then report the problems with the constraints of this + element to the user. When reporting the problem with the constraints to the user, the user + agent may run the focusing steps for this element, and may change the scrolling + position of the document, or perform some other action that brings this element to the user's + attention. User agents may report more than one constraint violation, if this element suffers + from multiple problems at once. If this element is not being rendered, then the + user agent may, instead of notifying the user, report the error for the + running script.

    7. Return false.

    @@ -54594,11 +54625,18 @@ fur data-x="event-invalid">invalid
    at the form element and then abort these steps.

    -
  • If the submitted from submit() - method flag is not set, then fire a simple event that bubbles and is - cancelable named submit, at form. If the - event's default action is prevented (i.e. if the event is canceled) then abort these steps. - Otherwise, continue (effectively the default action is to perform the submission).

  • +
  • +

    If the submitted from submit() method flag + is not set, then: + +

      +
    1. Let continue be the result of firing an + event named submit at form, with the + bubbles attribute initialized to true and the cancelable attribute initialized to true.

    2. + +
    3. If continue is false, then abort these steps. +

    @@ -55322,15 +55360,24 @@ fur

    Resetting a form

    When a form element form is reset, the user agent must fire a simple event named - reset, that bubbles and is cancelable, at form, and then, if that event is not canceled, must invoke the reset algorithm of each resettable element whose form owner is form.

    + data-x="concept-form-reset">reset, run these steps:

    + +
      +
    1. Let isTrusted false, if this algorithm is invoked by the reset() method, and true otherwise.

    2. + +
    3. Let reset be the result of firing an + event named reset at form, with the bubbles attribute initialized to true, cancelable attribute initialized to true, and isTrusted attribute initialized to + isTrusted.

    4. -

      When the reset algorithm is invoked by the reset() method, the reset event - fired by the reset algorithm must not be trusted.

      +
    5. If reset is true, then invoke the reset algorithm of each resettable element whose form owner is + form.

    6. +

    Each resettable element defines its own reset algorithm. Changes made to form controls as part of @@ -56049,19 +56096,20 @@ interface HTMLMenuItemElement : HTMLElement {

    If the user requested a context menu using a pointing device
    -

    The user agent must fire a trusted event with the name contextmenu, that bubbles and is cancelable, and that uses the - MouseEvent interface, at the element for which the menu was requested. The context - information of the event must be initialized to the same values as the last - MouseEvent user interaction event that was fired as part of the gesture that was - interpreted as a request for the context menu.

    +

    The user agent must fire an event named + contextmenu at the element for which the menu was + requested, using MouseEvent, with the bubbles and cancelable attributes initialized to true, and other + attributes initialized to the same values as the last MouseEvent user interaction + event that was fired as part of the gesture that was interpreted as a request for the context + menu.

    Otherwise

    The user agent must fire a synthetic mouse - event named contextmenu that bubbles and is - cancelable at the element for which the menu was requested.

    + event named contextmenu at the element for which + the menu was requested.

    @@ -56081,16 +56129,20 @@ interface HTMLMenuItemElement : HTMLElement {

    Otherwise, let subject be the element for which the menu was requested, and let menu be the assigned context menu of target immediately after the contextmenu event's dispatch has completed. The user - agent must fire a trusted event with the name show at menu, using the RelatedEvent interface, - with the relatedTarget attribute initialized - to subject. The event must be cancelable.

    + agent must run these steps:

    + +
      +
    1. Let build be the result of firing an + event named show at menu, using + RelatedEvent, with the cancelable + attribute initialized to true and the relatedTarget attribute initialized to + subject.

      + -

      If this event (the show event) is not canceled, then - the user agent must build and show the menu for - menu with subject as the subject.

      +
    2. If build is true, then build and + show the menu for menu with subject as the subject.

    3. +

    The user agent may also provide access to its default context menu, if any, with the context menu shown. For example, it could merge the menu items from the two menus together, or provide the @@ -56738,11 +56790,20 @@ interface HTMLDialogElement : HTMLElement {

    Canceling dialogs: When a Document's pending dialog stack is not empty, user agents may provide a user interface that, upon activation, queues a task to fire a simple event named cancel that is cancelable at the top dialog element on - the Document's pending dialog stack. The default action of this event - must be to check if that element has an open attribute, and - if it does, close the dialog with no return value.

    + data-x="queue a task">queues a task to run these steps: + +
      +
    1. Let dialog be the top dialog element on the + Document's pending dialog stack.

    2. + +
    3. Let close be the result of firing an + event named cancel at dialog, with the cancelable attribute initialized to true.

    4. + +
    5. If close is true and dialog has an open attribute, then close the dialog with no + return value.

    6. +

    An example of such a UI mechanism would be the user pressing the "Escape" key.

    @@ -72359,12 +72420,13 @@ END:VCARD