Skip to content
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

Added a duplicate attribute present member to element create call #4223

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 4 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
32 changes: 24 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -57856,6 +57856,12 @@ o............A....e
<span data-x="prepare a script">prepared</span>, based on the <code
data-x="attr-script-src">src</code> attribute of the element at that time.</p>

<p>The seventh is a flag indicating whether or not the script has a <dfn
data-x="concept-script-duplicate-attribute">duplicate attribute</dfn>. This flag is intially
Copy link
Member

@annevk annevk Dec 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to the CSP PR I realized we need to export this. You'll need to add: data-export="" data-dfn-type="dfn" data-dfn-for="script" to the <dfn>.

unset and can be set after the tokenizer <span data-x="create an element for the token">creates
the element</span>. This flag is used for security checks in <cite>Content Security Policy
annevk marked this conversation as resolved.
Show resolved Hide resolved
</cite>.<ref spec="CSP"></p>
annevk marked this conversation as resolved.
Show resolved Hide resolved

<p>Finally, a <code>script</code> element has <dfn data-x="concept-script-script"
data-export="">the script's script</dfn>, which is a <span data-x="concept-script">script</span>
resulting from <span data-x="prepare a script">preparing</span> the element. This is set
Expand Down Expand Up @@ -103059,12 +103065,14 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
DOCTYPE, start tag, end tag, comment, character, end-of-file. DOCTYPE tokens have a name, a public
identifier, a system identifier, and a <dfn><i>force-quirks flag</i></dfn>. When a DOCTYPE token
is created, its name, public identifier, and system identifier must be marked as missing (which is
a distinct state from the empty string), and the <i data-x="force-quirks flag">force-quirks flag</i> must be set to
<i>off</i> (its other state is <i>on</i>). Start and end tag tokens have a tag name, a <dfn
data-x="self-closing flag">self-closing flag</dfn>, and a list of attributes, each of which has a
name and a value. When a start or end tag token is created, its <i data-x="self-closing
flag">self-closing flag</i> must be unset (its other state is that it be set), and its attributes
list must be empty. Comment and character tokens have data.</p>
a distinct state from the empty string), and the <i data-x="force-quirks flag">force-quirks flag</i>
must be set to <i>off</i> (its other state is <i>on</i>). Start and end tag tokens have a tag name,
a <dfn data-x="self-closing flag">self-closing flag</dfn>, a <dfn data-x="duplicate attribute
annevk marked this conversation as resolved.
Show resolved Hide resolved
flag">duplicate attribute flag</dfn>, and a list of attributes, each of which has a name and a
value. When a start or end tag token is created, its <i data-x="self-closing flag">self-closing
flag</i> must be unset (its other state is that it be set), its <i data-x="duplicate attribute
flag"> duplicate attribute flag</i> must be unset (its other state is that it be set), and its
attributes list must be empty. Comment and character tokens have data.</p>

<p>When a token is emitted, it must immediately be handled by the <span>tree construction</span>
stage. The tree construction stage can affect the state of the tokenization stage, and can insert
Expand Down Expand Up @@ -104054,8 +104062,9 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
<p>When the user agent leaves the attribute name state (and before emitting the tag token, if
appropriate), the complete attribute's name must be compared to the other attributes on the same
token; if there is already an attribute on the token with the exact same name, then this is a
<span data-x="parse-error-duplicate-attribute">duplicate-attribute</span> <span>parse error</span>
and the new attribute must be removed from the token.</p>
<span data-x="parse-error-duplicate-attribute">duplicate-attribute</span> <span>parse error</span>,
the new attribute must be removed from the token, and the token's <i data-x="duplicate attribute
flag">duplicate attribute flag</i> must be set.</p>

<p class="note">If an attribute is so removed from a token, it, and the value that gets associated
with it, if any, are never subsequently used by the parser, and are therefore effectively
Expand Down Expand Up @@ -105747,6 +105756,13 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
data-x="dom-document-open">the document to be blown away</span>.</p>
</li>

<li>
annevk marked this conversation as resolved.
Show resolved Hide resolved
<p>If <var>element</var> is a <code>script</code> element and the <span data-x="duplicate
attribute flag">duplicate attribute flag</span> of the token is set, then set
annevk marked this conversation as resolved.
Show resolved Hide resolved
<var>element</var>'s <span data-x="concept-script-duplicate-attribute">duplicate attribute</span>
flag.</p>
</li>

<li>
<p><span data-x="concept-element-attributes-append">Append</span> each attribute in the given
token to <var>element</var>.</p>
Expand Down