Skip to content

Commit b525966

Browse files
foolipannevk
authored andcommitted
Fix #41: make createAttribute() lowercase the input in HTML documents
Closes: #74, #75.
1 parent a923241 commit b525966

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dom.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ No Editor: true
1212
Logo: https://resources.whatwg.org/logo-dom.svg
1313
Abstract: DOM defines a platform-neutral model for events and node trees.
1414
Ignored Terms: EmptyString, Array, Elements, Document
15-
Boilerplate: omit conformance
15+
Boilerplate: omit conformance, omit feedback-header
1616
</pre>
1717

1818
<!--
@@ -4670,13 +4670,13 @@ method, when invoked, must run these steps:
46704670
production in XML, <a>throw</a> an
46714671
{{InvalidCharacterError}} exception.
46724672

4673+
<li>If the <a>context object</a> is an <a>HTML document</a>, let
4674+
<var>localName</var> be <a>converted to ASCII lowercase</a>.
4675+
46734676
<li>Return a new <a>attribute</a> whose
46744677
<a for=Attr>local name</a> is <var>localName</var>.
46754678
</ol>
46764679

4677-
<p class="note no-backref">This method does not have its input
4678-
<a>converted to ASCII lowercase</a>.
4679-
46804680
The
46814681
<dfn method for="Document">createAttributeNS(<var>namespace</var>, <var>name</var>)</dfn>
46824682
method, when invoked, must run these steps:

dom.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<div class="head">
7070
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
7171
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
72-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2015-09-16">16 September 2015</time></span></h2>
72+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2015-09-22">22 September 2015</time></span></h2>
7373
<div data-fill-with="spec-metadata">
7474
<dl>
7575
<dt>Participate:
@@ -2435,9 +2435,9 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
24352435
<p>The <dfn class="idl-code" data-dfn-for="Document" data-dfn-type="method" data-export="" id="dom-document-createattribute">createAttribute(<var>localName</var>)<a class="self-link" href="#dom-document-createattribute"></a></dfn> method, when invoked, must run these steps:</p>
24362436
<ol>
24372437
<li>If <var>localName</var> does not match the <code><a class="css" data-link-type="type" href="http://www.w3.org/TR/xml/#NT-Name">Name</a></code> production in XML, <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidcharactererror">InvalidCharacterError</a></code> exception.
2438+
<li>If the <a data-link-type="dfn" href="#context-object">context object</a> is an <a data-link-type="dfn" href="#html-document">HTML document</a>, let <var>localName</var> be <a data-link-type="dfn" href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.
24382439
<li>Return a new <a data-link-type="dfn" href="#concept-attribute">attribute</a> whose <a data-link-type="dfn" href="#concept-attribute-local-name">local name</a> is <var>localName</var>.
24392440
</ol>
2440-
<p class="note no-backref" role="note">This method does not have its input <a data-link-type="dfn" href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>. </p>
24412441
<p>The <dfn class="idl-code" data-dfn-for="Document" data-dfn-type="method" data-export="" id="dom-document-createattributens">createAttributeNS(<var>namespace</var>, <var>name</var>)<a class="self-link" href="#dom-document-createattributens"></a></dfn> method, when invoked, must run these steps:</p>
24422442
<ol>
24432443
<li>Let <var>namespace</var>, <var>prefix</var>, <var>localName</var>, and <var>name</var> be the result of passing <var>namespace</var> and <var>name</var> to <a data-link-type="dfn" href="#validate-and-extract">validate and extract</a>. Rethrow any exceptions.
@@ -3130,7 +3130,7 @@ <h3 class="heading settled" data-level="5.1" id="introduction-to-dom-ranges"><sp
31303130
<code class="idl"><a data-link-type="idl" href="#element">Element</a></code>: <code>p</code>
31313131
<ul>
31323132
<li class="t1"><code class="idl"><a data-link-type="idl" href="#element">Element</a></code>: <code class="lang-markup highlight"><span class="nt">&lt;img</span> <span class="na">src=</span><span class="s">"insanity-wolf"</span> <span class="na">alt=</span><span class="s">"Little-ending BOM; decode as big-endian!"</span><span class="nt">></span></code>
3133-
<li class="t3"><code class="idl"><a data-link-type="idl" href="#text">Text</a></code>: <span> CSS 2.1 syndata is </span>
3133+
<li class="t3"><code class="idl"><a data-link-type="idl" href="#text">Text</a></code>: <span> CSS 2.1 syndata is </span>
31343134
<li class="t1">
31353135
<code class="idl"><a data-link-type="idl" href="#element">Element</a></code>: <code class="lang-markup highlight"><span class="nt">&lt;em></span></code>
31363136
<ul>

0 commit comments

Comments
 (0)