Skip to content

Commit

Permalink
Allow <a>/<area> with download="" to not require user activation
Browse files Browse the repository at this point in the history
Fixes #2116, wherein it is documented that this restriction is not
supported in any existing engines and attempting to do so in WebKit
proved not web-compatible.

Also helps with #1431.
  • Loading branch information
domenic committed Dec 6, 2016
1 parent 1a4bed4 commit 5de03c7
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -18507,28 +18507,6 @@ interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
<!-- https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2033 -->
<!-- https://www.hixie.ch/tests/adhoc/html/navigation/iframe/002.html -->

<li>

<p>If either the <code>a</code> element has a <code
data-x="attr-hyperlink-download">download</code> attribute and the algorithm is not
<span>triggered by user activation</span>; or, if the user has not indicated a specific
<span>browsing context</span> for following the link, and the element's <code
data-x="attr-hyperlink-target">target</code> attribute is present, and applying <span>the rules
for choosing a browsing context given a browsing context name</span>, using the value of the
<code data-x="attr-hyperlink-target">target</code> attribute as the browsing context name, would
result in there not being a chosen browsing context, then run these substeps:</p>

<ol>

<li><p>If there is an <span>entry settings object</span>, throw an
<span>"<code>InvalidAccessError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Abort these steps without following the hyperlink.</p></li>

</ol>

</li>

<li><p>If the target of the <code data-x="event-click">click</code> event is an <code>img</code>
element with an <code data-x="attr-img-ismap">ismap</code> attribute specified, then server-side
image map processing must be performed, as follows:</p>
Expand Down Expand Up @@ -37347,28 +37325,6 @@ interface <dfn>HTMLAreaElement</dfn> : <span>HTMLElement</span> {
<li><p>If the <code>area</code> element's <span>node document</span> is not <span>fully active</span>,
then abort these steps.</p></li>

<li>

<p>If the <code>area</code> element has a <code data-x="attr-hyperlink-download">download</code>
attribute and the algorithm is not <span>triggered by user activation</span>; or, if the user
has not indicated a specific <span>browsing context</span> for following the link, and the
element's <code data-x="attr-hyperlink-target">target</code> attribute is present, and applying
<span>the rules for choosing a browsing context given a browsing context name</span>, using the
value of the <code data-x="attr-hyperlink-target">target</code> attribute as the browsing
context name, would result in there not being a chosen browsing context, then run these
substeps:</p>

<ol>

<li><p>If there is an <span>entry settings object</span>, throw an
<span>"<code>InvalidAccessError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Abort these steps without following the hyperlink.</p></li>

</ol>

</li>

<li><p>Otherwise, the user agent must <span data-x="following hyperlinks">follow the
hyperlink</span> or <span data-x="downloading hyperlinks">download the hyperlink</span> created
by the <code>area</code> element, if any, and as determined by the <code
Expand Down

0 comments on commit 5de03c7

Please sign in to comment.