Skip to content

Commit

Permalink
BREAKING CHANGE: make share() consume user activation (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Cáceres authored Jun 17, 2020
1 parent 4ef0a2d commit f62dc29
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ <h4>
|data:ShareData|, run the following steps:
</p>
<ol class="algorithm">
<li>Let |window| be [=relevant global object=] of [=this=].
</li>
<li>If |window| does not have [=transient activation=], return [=a
promise rejected with=] with a {{"NotAllowedError"}}
{{DOMException}}.
</li>
<li>[=Consume user activation=] of |window|.
</li>
<li>If {{[[sharePromise]]}} is not `null`, return <a>a promise
rejected with</a> {{InvalidStateError}}.
</li>
Expand Down Expand Up @@ -170,10 +178,9 @@ <h4>
</li>
</ol>
</li>
<li>If the [=relevant global object=] of [=this=] does not have
[=transient activation=], or a file type is being blocked due to
security considerations, return <a>a promise rejected with</a> with
a {{"NotAllowedError"}} {{DOMException}}.
<li>If a file type is being blocked due to security considerations,
return <a>a promise rejected with</a> with a {{"NotAllowedError"}}
{{DOMException}}.
</li>
<li>Set {{[[sharePromise]]}} to be <a>a new promise</a>.
</li>
Expand Down

0 comments on commit f62dc29

Please sign in to comment.