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

Clarify and add examples for "extended attributes associated with" #355

Merged
merged 1 commit into from May 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
65 changes: 60 additions & 5 deletions index.bs
Expand Up @@ -5992,21 +5992,76 @@ The following extended attributes are <dfn for="extended attributes">applicable
production, [=set/append=] each of the [=extended attributes=] present in the production's
<emu-nt><a href="#prod-ExtendedAttributeList">ExtendedAttributeList</a></emu-nt> to
|extended attributes|.

<div class="example">
<pre class="idl">
interface I {
attribute [XAttr] long attrib;
void f1(sequence<[XAttr] long> arg);
void f2(optional [XAttr] long arg);

maplike&lt;[XAttr2] DOMString, [XAttr3] long>;
};

dictionary D {
required [XAttr] long member;
};
</pre>
</div>
1. If |type| is a [=member type=] of a [=union type=] |U|, [=set/append=] each of the
[=extended attributes associated with=] |U| to |extended attributes|.

<div class="example">
<pre class="idl">
interface I {
attribute [XAttr] (long or Node) attrib;
};
</pre>
</div>
1. If |type| appears as part of a <emu-nt><a href="#prod-Type">Type</a></emu-nt> production
within an <emu-nt><a href="#prod-Argument">Argument</a></emu-nt> production, [=set/append=]
to |extended attributes| all of the [=extended attributes=] present in the production's
directly within an <emu-nt><a href="#prod-Argument">Argument</a></emu-nt> production,
[=set/append=] to |extended attributes| all of the [=extended attributes=] present in the
production's
<emu-nt><a href="#prod-ExtendedAttributeList">ExtendedAttributeList</a></emu-nt> that are
[=applicable to types=].

<div class="example">
<pre class="idl">
interface I {
void f([XAttr] long attrib);
};
</pre>

Note that this is an example of this step only if [<code>XAttr</code>] is
[=applicable to types=]; otherwise [<code>XAttr</code>] applies to the argument, and not
the argument's type.
</div>
1. If |type| appears as part of a <emu-nt><a href="#prod-Type">Type</a></emu-nt> production
within an <emu-nt><a href="#prod-DictionaryMember">DictionaryMember</a></emu-nt> production,
[=set/append=] to |extended attributes| all of the [=extended attributes=] present in the
production's
directly within an <emu-nt><a href="#prod-DictionaryMember">DictionaryMember</a></emu-nt>
production, [=set/append=] to |extended attributes| all of the [=extended attributes=]
present in the production's
<emu-nt><a href="#prod-ExtendedAttributeList">ExtendedAttributeList</a></emu-nt> that are
[=applicable to types=].

<div class="example">
<pre class="idl">
dictionary D {
[XAttr] long member;
};
</pre>

Note that this is an example of this step only if [<code>XAttr</code>] is
[=applicable to types=]; otherwise [<code>XAttr</code>] applies to the dictionary
member, and not the member's type.
</div>
1. If |type| is a [=typedef=], [=set/append=] the [=extended attributes associated with=] the
[=type being given a new name=] to |extended attributes|.

<div class="example">
<pre class="idl">
typedef [XAttr] long xlong;
</pre>
</div>
1. Return |extended attributes|.
</div>

Expand Down