Skip to content

Make createAttribute() lowercase the input in HTML documents #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4670,13 +4670,13 @@ method, when invoked, must run these steps:
production in XML, <a>throw</a> an
{{InvalidCharacterError}} exception.

<li>If the <a>context object</a> is an <a>HTML document</a>, let
<var>localName</var> be <a>converted to ASCII lowercase</a>.

<li>Return a new <a>attribute</a> whose
<a for=Attr>local name</a> is <var>localName</var>.
</ol>

<p class="note no-backref">This method does not have its input
<a>converted to ASCII lowercase</a>.

The
<dfn method for="Document">createAttributeNS(<var>namespace</var>, <var>name</var>)</dfn>
method, when invoked, must run these steps:
Expand Down
2 changes: 1 addition & 1 deletion dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2435,9 +2435,9 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
<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>
<ol>
<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.
<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>.
<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>.
</ol>
<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>
<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>
<ol>
<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.
Expand Down