Skip to content
Permalink
Browse files

[giow] (3) Make content attribute event handlers work slightly more l…

…ike in more browsers.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23956
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8376 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jan 6, 2014
1 parent b0aa103 commit da64092370e825e714cf9caa5ba89bd7f7b1730a
Showing with 53 additions and 34 deletions.
  1. +17 −11 complete.html
  2. +17 −11 index
  3. +19 −12 source

<div class=impl>

<!--CLEANUP-->
<p>When an <a href=#event-handler-content-attributes title="event handler content attributes">event handler content attribute</a>
is set, if the element is owned by a <code><a href=#document>Document</a></code> that is in a <a href=#browsing-context>browsing
context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is enabled</a> for that
<a href=#browsing-context>browsing context</a>, the user agent must set the corresponding <a href=#event-handlers title="event
is set, the user agent must set the corresponding <a href=#event-handlers title="event
handlers">event handler</a> to an <a href=#internal-raw-uncompiled-handler>internal raw uncompiled handler</a> consisting of
the attribute's new value and the script location where the attribute was set to this value</p>

see http://www.w3.org/Bugs/Public/show_bug.cgi?id=7626#c5 for reasoning
-->

<p class=note>When an <a href=#event-handler-content-attributes title="event handler content attributes">event handler content
attribute</a> is set on an element owned by a <code><a href=#document>Document</a></code> that is not in a
<a href=#browsing-context>browsing context</a>, the corresponding event handler is not changed.</p>

<hr><p>When an <a href=#event-handlers title="event handlers">event handler</a> <var title="">H</var> of an element
or object <var title="">T</var> implementing the <code><a href=#eventtarget>EventTarget</a></code> interface is first set
to a non-null value, the user agent must append an <a href=#concept-event-listener title=concept-event-listener>event

</li>

<li><p>If <!--<var title="">element</var> is not null and--> <var title="">document</var> is
not in a <a href=#browsing-context>browsing context</a>, or if <a href=#concept-bc-script title=concept-bc-script>scripting is
enabled</a> for <var title="">document</var>'s <a href=#browsing-context>browsing context</a>, then return
null and abort the algorithm for <a href=#getting-the-current-value-of-the-event-handler>getting the current value of the event
handler</a>.</li>

<li><p>Let <var title="">body</var> be the uncompiled script body in the <a href=#internal-raw-uncompiled-handler>internal raw
uncompiled handler</a>.</li>


<dd>The value of <var title="">strict</var>.</dd>

</dl><!-- SCRIPT EXEC --><p>Let this new function be a new <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code
entry-point</a>.</p>
</dl><p>Let <var title="">function</var> be this new function.</p>

</li>

<li><p>Let that <a href=#concept-script title=concept-script>script</a>'s <a href=#settings-object>settings object</a> be
<li><p>Let <var title="">script</var> be a new <a href=#concept-script title=concept-script>script</a>.</li>

<!-- SCRIPT EXEC -->
<li><p>Let <var title="">script</var>'s <a href=#code-entry-point>code entry-point</a> be <var title="">function</var>.</li>

<!--CLEANUP-->
<li><p>Let <var title="">script</var>'s <a href=#settings-object>settings object</a> be
<var title="">script settings</var>.</li>

<li><p>Set <var title="">H</var> to the aforementioned function.</li>
<li><p>Set <var title="">H</var> to <var title="">function</var>.</li>

</ol></li>

28 index

<div class=impl>

<!--CLEANUP-->
<p>When an <a href=#event-handler-content-attributes title="event handler content attributes">event handler content attribute</a>
is set, if the element is owned by a <code><a href=#document>Document</a></code> that is in a <a href=#browsing-context>browsing
context</a>, and <a href=#concept-bc-script title=concept-bc-script>scripting is enabled</a> for that
<a href=#browsing-context>browsing context</a>, the user agent must set the corresponding <a href=#event-handlers title="event
is set, the user agent must set the corresponding <a href=#event-handlers title="event
handlers">event handler</a> to an <a href=#internal-raw-uncompiled-handler>internal raw uncompiled handler</a> consisting of
the attribute's new value and the script location where the attribute was set to this value</p>

see http://www.w3.org/Bugs/Public/show_bug.cgi?id=7626#c5 for reasoning
-->

<p class=note>When an <a href=#event-handler-content-attributes title="event handler content attributes">event handler content
attribute</a> is set on an element owned by a <code><a href=#document>Document</a></code> that is not in a
<a href=#browsing-context>browsing context</a>, the corresponding event handler is not changed.</p>

<hr><p>When an <a href=#event-handlers title="event handlers">event handler</a> <var title="">H</var> of an element
or object <var title="">T</var> implementing the <code><a href=#eventtarget>EventTarget</a></code> interface is first set
to a non-null value, the user agent must append an <a href=#concept-event-listener title=concept-event-listener>event

</li>

<li><p>If <!--<var title="">element</var> is not null and--> <var title="">document</var> is
not in a <a href=#browsing-context>browsing context</a>, or if <a href=#concept-bc-script title=concept-bc-script>scripting is
enabled</a> for <var title="">document</var>'s <a href=#browsing-context>browsing context</a>, then return
null and abort the algorithm for <a href=#getting-the-current-value-of-the-event-handler>getting the current value of the event
handler</a>.</li>

<li><p>Let <var title="">body</var> be the uncompiled script body in the <a href=#internal-raw-uncompiled-handler>internal raw
uncompiled handler</a>.</li>


<dd>The value of <var title="">strict</var>.</dd>

</dl><!-- SCRIPT EXEC --><p>Let this new function be a new <a href=#concept-script title=concept-script>script</a>'s <a href=#code-entry-point>code
entry-point</a>.</p>
</dl><p>Let <var title="">function</var> be this new function.</p>

</li>

<li><p>Let that <a href=#concept-script title=concept-script>script</a>'s <a href=#settings-object>settings object</a> be
<li><p>Let <var title="">script</var> be a new <a href=#concept-script title=concept-script>script</a>.</li>

<!-- SCRIPT EXEC -->
<li><p>Let <var title="">script</var>'s <a href=#code-entry-point>code entry-point</a> be <var title="">function</var>.</li>

<!--CLEANUP-->
<li><p>Let <var title="">script</var>'s <a href=#settings-object>settings object</a> be
<var title="">script settings</var>.</li>

<li><p>Set <var title="">H</var> to the aforementioned function.</li>
<li><p>Set <var title="">H</var> to <var title="">function</var>.</li>

</ol></li>

31 source

<div class="impl">

<!--CLEANUP-->
<p>When an <span data-x="event handler content attributes">event handler content attribute</span>
is set, if the element is owned by a <code>Document</code> that is in a <span>browsing
context</span>, and <span data-x="concept-bc-script">scripting is enabled</span> for that
<span>browsing context</span>, the user agent must set the corresponding <span data-x="event
is set, the user agent must set the corresponding <span data-x="event
handlers">event handler</span> to an <span>internal raw uncompiled handler</span> consisting of
the attribute's new value and the script location where the attribute was set to this value</p>

see http://www.w3.org/Bugs/Public/show_bug.cgi?id=7626#c5 for reasoning
-->

<p class="note">When an <span data-x="event handler content attributes">event handler content
attribute</span> is set on an element owned by a <code>Document</code> that is not in a
<span>browsing context</span>, the corresponding event handler is not changed.</p>

<hr>

<p>When an <span data-x="event handlers">event handler</span> <var data-x="">H</var> of an element

</li>

<li><p>If <!--<var data-x="">element</var> is not null and--> <var data-x="">document</var> is
not in a <span>browsing context</span>, or if <span data-x="concept-bc-script">scripting is
enabled</span> for <var data-x="">document</var>'s <span>browsing context</span>, then return
null and abort the algorithm for <span>getting the current value of the event
handler</span>.</p></li>

<li><p>Let <var data-x="">body</var> be the uncompiled script body in the <span>internal raw
uncompiled handler</span>.</p></li>


</dl>

<!-- SCRIPT EXEC -->
<p>Let this new function be a new <span data-x="concept-script">script</span>'s <span>code
entry-point</span>.</p>
<p>Let <var data-x="">function</var> be this new function.</p>

</li>

<li><p>Let that <span data-x="concept-script">script</span>'s <span>settings object</span> be
<li><p>Let <var data-x="">script</var> be a new <span
data-x="concept-script">script</span>.</p></li>

<!-- SCRIPT EXEC -->
<li><p>Let <var data-x="">script</var>'s <span>code entry-point</span> be <var
data-x="">function</var>.</p></li>

<!--CLEANUP-->
<li><p>Let <var data-x="">script</var>'s <span>settings object</span> be
<var data-x="">script settings</var>.</p></li>

<li><p>Set <var data-x="">H</var> to the aforementioned function.</p></li>
<li><p>Set <var data-x="">H</var> to <var data-x="">function</var>.</p></li>

</ol>

0 comments on commit da64092

Please sign in to comment.
You can’t perform that action at this time.