diff --git a/dom.bs b/dom.bs index 0baf3a04a..c14ea590e 100644 --- a/dom.bs +++ b/dom.bs @@ -1,4 +1,4 @@ -
+
 Group: WHATWG
 H1: DOM
 Shortname: dom
@@ -358,34 +358,24 @@ use of this functionality through events
 (synthetic events) can make use of the return value of the
 {{EventTarget/dispatchEvent()}} method:
 
-
+
 if(obj.dispatchEvent(event)) {
   // event was not canceled, time for some magic
   …
 }
 
-When an event is -dispatched to an object that -participates in a -tree (e.g. an -element), it can reach -event listeners on that object's -ancestors too. First all object's -ancestor -event listeners whose -capture variable is set to true are invoked, in -tree order. Second, object's own -event listeners are invoked. And -finally, and only if event's -{{Event/bubbles}} attribute value is true, -object's ancestor -event listeners are invoked again, -but now in reverse tree order. - -Let's look at an example of how events work in a tree: - -
+

When an event is dispatched to an object that participates in a tree +(e.g., an element), it can reach event listeners on that object's +ancestors too. Effectively, all the object's inclusive ancestor event listeners +whose capture is true are invoked, in tree order. And then, if +event's {{Event/bubbles}} is true, all the object's inclusive ancestor +event listeners whose capture is false are invoked, now in +reverse tree order. + +

Let's look at an example of how events work in a tree: + +

 <!doctype html>
 <html>
  <head>
@@ -406,19 +396,13 @@ Let's look at an example of how events work in a tree:
 </html>
 
-The debug function will be invoked twice. Each time the event's -{{Event/target}} attribute value will be the -span element. The -first time {{Event/currentTarget}} attribute's -value will be the document, the second -time the body element. -{{Event/eventPhase}} attribute's value -switches from {{Event/CAPTURING_PHASE}} -to {{Event/BUBBLING_PHASE}}. If an -event listener was registered for -the span element, -{{Event/eventPhase}} attribute's value -would have been {{Event/AT_TARGET}}. +

The debug function will be invoked twice. Each time the event's +{{Event/target}} attribute value will be the span element. The first time +{{Event/currentTarget}} attribute's value will be the document, the second time the +body element. {{Event/eventPhase}} attribute's value switches from +{{Event/CAPTURING_PHASE}} to {{Event/BUBBLING_PHASE}}. If an event listener was registered +for the span element, {{Event/eventPhase}} attribute's value would have +been {{Event/AT_TARGET}}.

Interface {{Event}}

@@ -1959,7 +1943,7 @@ applications. To illustrate, consider this HTML document: -
+
 <!DOCTYPE html>
 <html class=e>
  <head><title>Aliens?</title></head>
@@ -4499,7 +4483,7 @@ when invoked, must run these steps:
 
   

Whether to return {{Node/DOCUMENT_POSITION_PRECEDING}} or {{Node/DOCUMENT_POSITION_FOLLOWING}} is typically implemented via pointer comparison. In - JavaScript implementations a cached Math.random() value can + JavaScript implementations a cached Math.random() value can be used.

  • If node1 is an ancestor of node2 and attr1 is null, @@ -5020,7 +5004,7 @@ method, when invoked, must return the list of elements with qualified name qualifiedName for this.

    Thus, in an HTML document, -document.getElementsByTagName("FOO") will match +document.getElementsByTagName("FOO") will match <FOO> elements that are not in the HTML namespace, and <foo> elements that are in the HTML namespace, but not <FOO> elements @@ -7519,9 +7503,9 @@ are boundary points. A boundary point is a tuple cons

    • {{Element}}: p
        -
      • {{Element}}: <img src="insanity-wolf" alt="Little-endian BOM; decode as big-endian!"> +
      • {{Element}}: <img src="insanity-wolf" alt="Little-endian BOM; decode as big-endian!">
      • {{Text}}:  CSS 2.1 syndata is  -
      • {{Element}}: <em> +
      • {{Element}}: <em>
        • {{Text}}: awesome
        @@ -7537,7 +7521,7 @@ are boundary points. A boundary point is a tuple cons em to the em element, this would be done as follows: -
        
        +
        
         var range = new Range(),
             firstText = p.childNodes[1],
             secondText = em.firstChild
        @@ -10177,6 +10161,7 @@ Justin Summerlin,
         Kagami Sascha Rosylight,
         呂康豪 (Kang-Hao Lu),
         田村健人 (Kent TAMURA),
        +Kevin J. Sung,
         Kevin Sweeney,
         Kirill Topolyan,
         Koji Ishii,