diff --git a/dom.bs b/dom.bs index 342cd9e35..bb32e85b6 100644 --- a/dom.bs +++ b/dom.bs @@ -1614,12 +1614,12 @@ steps: to node's next sibling. +
Let previousSibling be child's previous sibling. +
Let previousSibling be child's previous sibling. -
addEventListener()
:
- obj.addEventListener("load", imgFetched) +obj.addEventListener("load", imgFetched) function imgFetched(ev) { // great success @@ -766,7 +766,7 @@
- // add an appropriate event listener +// add an appropriate event listener obj.addEventListener("cat", function(e) { process(e.detail) }) // create and dispatch the event @@ -790,7 +790,7 @@
dispatchEvent() method: - if(obj.dispatchEvent(event)) { +if(obj.dispatchEvent(event)) { // event was not canceled, time for some magic … }@@ -818,7 +818,7 @@
Lets look at an example of how events work in a tree: - <!doctype html> +<!doctype html> <html> <head> <title>Boring example</title> @@ -1628,7 +1628,7 @@To illustrate, consider this HTML document: -
<!DOCTYPE html> +<!DOCTYPE html> <html class=e> <head><title>Aliens?</title></head> <body>Why yes.</body> @@ -2161,15 +2161,15 @@next sibling. +
- +
Let previousSibling be child’s previous sibling. + +
- Adopt node into parent’s node document. -
- -
Let previousSibling be child’s previous sibling. - -
- Remove child from its parent with the suppress observers flag set. @@ -2591,7 +2591,7 @@
- Let s be the result of - parse a relative selector from + parse a relative selector from relativeSelectors against set. [SELECTORS4] @@ -2599,8 +2599,8 @@
If s is failure, throw a
SyntaxError
. -- Return the result of evaluate a selector s - using :scope elements set. [SELECTORS4] +
- Return the result of evaluate a selector s + using :scope elements set. [SELECTORS4] @@ -2625,7 +2625,7 @@
- Let s be the result of - parse a selector selectors. + parse a selector selectors. [SELECTORS4] @@ -2633,12 +2633,12 @@
SyntaxError. -
- Return the result of evaluate a selector +
- Return the result of evaluate a selector s against node’s root using - scoping root node and + scoping root node and scoping method - scope-filtered. + scope-filtered. [SELECTORS4]. @@ -2948,7 +2948,7 @@
The queryAll(relativeSelectors) -method must return the result of running
this.constructor
with the +method must return the result of runningthis.constructor
with the result of running match a relative selectors string relativeSelectors against the context object. @@ -4808,7 +4808,7 @@DOCUMENT_POSITION_PRECEDING or
DOCUMENT_POSITION_FOLLOWING
is typically implemented via pointer comparison. In JavaScript - implementationsMath.random()
can be used. + implementationsMath.random()
can be used. @@ -5750,7 +5750,7 @@Note: 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 @@ -5786,20 +5786,20 @@A call to -
document.getElementById("example").getElementsByClassName("aaa")
+document.getElementById("example").getElementsByClassName("aaa")
would return aHTMLCollection
with the two paragraphsp1
andp2
in it.A call to -
getElementsByClassName("ccc bbb")
+getElementsByClassName("ccc bbb")
would only return one node, however, namelyp3
. A call to -document.getElementById("example").getElementsByClassName("bbb ccc ")
+document.getElementById("example").getElementsByClassName("bbb ccc ")
would return the same thing.A call to -
getElementsByClassName("aaa,bbb")
+getElementsByClassName("aaa,bbb")
would return no nodes; none of the elements above are in theaaa,bbb
class.
Name
production an
+ Name
production an
InvalidCharacterError
exception will be thrown.
@@ -5842,7 +5842,7 @@ Name
production an
+ Name
production an
InvalidCharacterError
exception will be thrown.
@@ -5857,7 +5857,7 @@ QName
production.
+ QName
production.
Name
production an
+ Name
production an
InvalidCharacterError
exception will be thrown.
If data contains "?>
" an
@@ -5931,7 +5931,7 @@ Name
production,
+ Name
production,
throw an
InvalidCharacterError
exception.
@@ -6007,7 +6007,7 @@ Name
production,
+ Name
production,
throw an
InvalidCharacterError
exception.
@@ -6043,7 +6043,7 @@ xml
" or ":
", or that
data contains characters that match the
-Char production.
+Char production.
Name
+ Name
production in XML, throw an
InvalidCharacterError
exception.
@@ -6394,10 +6394,10 @@ Name
production, an
+ match the Name
production, an
InvalidCharacterError
exception is thrown, and if it does not match the
- QName
production, a
+ QName
production, a
NamespaceError
exception
is thrown.
@@ -7314,7 +7314,7 @@ Name
production in XML,
+ Name
production in XML,
throw an
InvalidCharacterError
exception.
@@ -7499,7 +7499,7 @@ Element
: <img src="insanity-wolf" alt="Little-ending BOM; decode as big-endian!">
+ Element
: <img src="insanity-wolf" alt="Little-ending BOM; decode as big-endian!">
Text
: CSS 2.1 syndata is
- Element
: <em>
+ Element
: <em>
var range = new Range(), ++// range now stringifies to the aforementioned quotevar range = new Range(), firstText = p.childNodes[1], secondText = em.firstChild range.setStart(firstText, 9) // do not forget the leading space range.setEnd(secondText, 4) -// range now stringifies to the aforementioned quote
Note: Attributes such as @@ -10240,7 +10240,7 @@
createContextualFragment()
, getClientRects()
, and getBoundingClientRect()
methods
+ Note: The createContextualFragment()
, getClientRects()
, and getBoundingClientRect()
methods
are defined in other specifications.
[DOM-Parsing]
[CSSOM-VIEW]