Skip to content

Commit

Permalink
[geometry] Do not expose CSS parser in workers for DOMMatrix
Browse files Browse the repository at this point in the history
Annotate setMatrixValue with [Exposed=Window] and throw TypeError
when DOMMatrix/DOMMatrixReadOnly is constructed with a string
if the current global is not a Window.

Fixes #122.
  • Loading branch information
zcorpan committed May 3, 2017
1 parent 2e04b5d commit cd6633e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion geometry/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ interface DOMMatrix : DOMMatrixReadOnly {
DOMMatrix skewYSelf(optional unrestricted double sy = 0);
DOMMatrix invertSelf();

DOMMatrix setMatrixValue(DOMString transformList);
[Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
};

dictionary DOMMatrixInit {
Expand Down Expand Up @@ -683,6 +683,8 @@ the <dfn dfn-type=constructor dfn-for=DOMMatrix><code>DOMMatrix(<var>init</var>)
<dt>If <var>init</var> is a {{DOMString}}</dt>
<dd>
<ol>
<li>If <a>current global object</a> is not a {{Window}} object, then throw a {{TypeError}}
exception.</li>
<li>If <var>init</var> is the empty string, set it to the string
"<code>matrix(1, 0, 0, 1, 0, 0)</code>".</li>
<li>Parse <var>init</var> into <var>parsedValue</var> by following the syntax description in
Expand Down

0 comments on commit cd6633e

Please sign in to comment.