Skip to content
Browse files

Backout changeset a91d26af2523, because enums are case-sensitive.

  • Loading branch information...
1 parent 7408e9c commit c5d4631b576286553450fe1da53baf871344a435 @Ms2ger Ms2ger committed Sep 22, 2012
Showing with 30 additions and 44 deletions.
  1. +11 −16 domparser
  2. +10 −15 source.html
  3. +4 −1 tests/insert_adjacent_html.html
  4. +1 −11 tests/insert_adjacent_html.js
  5. +4 −1 tests/insert_adjacent_html.xhtml
View
27 domparser
@@ -19,7 +19,7 @@
<body class=draft>
<div class=head id=head>
<h1>DOM Parsing and Serialization</h1>
-<h2 class="no-num no-toc" id=living-specification-&mdash;-last-update-25-august-2012>Living Specification &mdash; Last Update 25 August 2012</h2>
+<h2 class="no-num no-toc" id=living-specification-&mdash;-last-update-22-september-2012>Living Specification &mdash; Last Update 22 September 2012</h2>
<dl>
<dt>This Version:
<dd><a href=http://html5.org/specs/dom-parsing.html>http://html5.org/specs/dom-parsing.html</a>
@@ -518,17 +518,10 @@ method must
<h2 id=extensions-to-the-element-interface><span class=secno>6 </span>Extensions to the <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element><code class=external data-anolis-spec=dom>Element</code></a> interface</h2>
-<pre class=idl>enum insertAdjacentHTMLPosition {
- "beforebegin",
- "afterbegin",
- "beforeend",
- "afterend"
-};
-
-partial interface <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a> {
+<pre class=idl>partial interface <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element>Element</a> {
attribute DOMString <a href=#dom-element-innerhtml title=dom-Element-innerHTML>innerHTML</a>;
attribute DOMString <a href=#dom-element-outerhtml title=dom-Element-outerHTML>outerHTML</a>;
- void <a href=#dom-element-insertadjacenthtml title=dom-Element-insertAdjacentHTML>insertAdjacentHTML</a>(insertAdjacentHTMLPosition <var title="">position</var>, DOMString <var title="">text</var>);
+ void <a href=#dom-element-insertadjacenthtml title=dom-Element-insertAdjacentHTML>insertAdjacentHTML</a>(DOMString <var title="">position</var>, DOMString <var title="">text</var>);
};</pre>
@@ -700,12 +693,10 @@ string).
<dd>After the element itself.
</dl>
- <p>Throws a TypeError exception if the <var title="">position</var> argument
- has an invalid value.
-
- <p>In <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document title="XML document">XML documents</a>,
- throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a>
- exception if the given string is not well-formed.
+ <p>Throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a>
+ exception if the arguments have invalid values (e.g., in the case of an
+ <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document>XML document</a>, if the given string is
+ not well-formed).
<p>Throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror><code class=external data-anolis-spec=dom>NoModificationAllowedError</code></a>
exception if the given position isn't possible (e.g. inserting elements
@@ -746,6 +737,10 @@ method must run these steps:
the string "beforeend"
<dd>
<p>Let <var title="">context</var> be the <a href=#context-object>context object</a>.
+
+ <dt>Otherwise
+ <dd>
+ <p>Throw a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a> exception.
</dl>
<li>
View
25 source.html
@@ -497,17 +497,10 @@ <h2 class=no-num>Issues</h2>
<h2>Extensions to the <code data-anolis-spec=dom>Element</code> interface</h2>
-<pre class=idl>enum insertAdjacentHTMLPosition {
- "beforebegin",
- "afterbegin",
- "beforeend",
- "afterend"
-};
-
-partial interface <span data-anolis-spec=dom>Element</span> {
+<pre class=idl>partial interface <span data-anolis-spec=dom>Element</span> {
attribute DOMString <span title=dom-Element-innerHTML>innerHTML</span>;
attribute DOMString <span title=dom-Element-outerHTML>outerHTML</span>;
- void <span title=dom-Element-insertAdjacentHTML>insertAdjacentHTML</span>(insertAdjacentHTMLPosition <var title>position</var>, DOMString <var title>text</var>);
+ void <span title=dom-Element-insertAdjacentHTML>insertAdjacentHTML</span>(DOMString <var title>position</var>, DOMString <var title>text</var>);
};</pre>
@@ -679,12 +672,10 @@ <h2 class=no-num>Issues</h2>
<dd>After the element itself.
</dl>
- <p>Throws a TypeError exception if the <var title>position</var> argument
- has an invalid value.
-
- <p>In <span data-anolis-spec=dom title="XML document">XML documents</span>,
- throws a <code data-anolis-spec=dom>SyntaxError</code>
- exception if the given string is not well-formed.
+ <p>Throws a <code data-anolis-spec=dom>SyntaxError</code>
+ exception if the arguments have invalid values (e.g., in the case of an
+ <span data-anolis-spec=dom>XML document</span>, if the given string is
+ not well-formed).
<p>Throws a <code data-anolis-spec=dom>NoModificationAllowedError</code>
exception if the given position isn't possible (e.g. inserting elements
@@ -725,6 +716,10 @@ <h2 class=no-num>Issues</h2>
the string "beforeend"
<dd>
<p>Let <var title>context</var> be the <span>context object</span>.
+
+ <dt>Otherwise
+ <dd>
+ <p>Throw a <code data-anolis-spec=dom>SyntaxError</code> exception.
</dl>
<li>
View
5 tests/insert_adjacent_html.html
@@ -49,7 +49,10 @@
testPositions(content); // without next sibling
testPositions(content); // test again when there's next sibling
-testThrowingPosition(content);
+test(function() {
+ assert_throws("SYNTAX_ERR", function() {content.insertAdjacentHTML("bar", "foo")});
+ assert_throws("SYNTAX_ERR", function() {content.insertAdjacentHTML("beforebegİn", "foo")});
+});
var parent = document.createElement("div");
var child = document.createElement("div");
View
12 tests/insert_adjacent_html.js
@@ -1,14 +1,3 @@
-function testThrowingPosition(element) {
- test(function() {
- assert_throws(new TypeError(),
- function() { element.insertAdjacentHTML("bar", "foo") }
- );
- assert_throws(new TypeError(),
- function() { element.insertAdjacentHTML("beforebegİn", "foo") }
- );
- });
-}
-
function testThrowingNoParent(element, desc) {
test(function() {
assert_throws("NO_MODIFICATION_ALLOWED_ERR",
@@ -41,3 +30,4 @@ function testThrowingNoParent(element, desc) {
);
}, "When the parent node is " + desc + ", insertAdjacentHTML should throw for beforebegin and afterend (elements)");
}
+
View
5 tests/insert_adjacent_html.xhtml
@@ -48,7 +48,10 @@ var content = document.getElementById("content");
testPositions(content); // without next sibling
testPositions(content); // test again when there's next sibling
-testThrowingPosition(content);
+test(function() {
+ assert_throws("SYNTAX_ERR", function() {content.insertAdjacentHTML("bar", "foo")});
+ assert_throws("SYNTAX_ERR", function() {content.insertAdjacentHTML("beforebegİn", "foo")});
+});
var parent = document.createElement("div");
var child = document.createElement("div");

0 comments on commit c5d4631

Please sign in to comment.
Something went wrong with that request. Please try again.