You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"html": "The <dfn data-dfn-for=\"OffscreenCanvas\" id=\"dom-offscreencanvas-converttoblob\" data-dfn-type=\"method\"><code>convertToBlob(<var>options</var>)</code></dfn> method,\n when invoked, must run the following steps:",
16779
+
"html": "The <dfn data-dfn-for=\"OffscreenCanvas\" id=\"dom-offscreencanvas-converttoblob\" data-dfn-type=\"method\"><code>convertToBlob(<var>options</var>)</code></dfn> method\n steps are:",
16780
16780
"rationale": "if",
16781
16781
"steps": [
16782
16782
{
16783
-
"html": "<p>If the value of this <code id=\"the-offscreencanvas-interface:offscreencanvas-28\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a id=\"the-offscreencanvas-interface:detached\" href=\"https://html.spec.whatwg.org/multipage/structured-data.html#detached\">[[Detached]]</a>\n internal slot is set to true, thenreturn <a id=\"the-offscreencanvas-interface:a-promise-rejected-with\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> an\n <a id=\"the-offscreencanvas-interface:invalidstateerror-6\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-6\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16783
+
"html": "<p>If the value of <a id=\"the-offscreencanvas-interface:this-15\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a id=\"the-offscreencanvas-interface:detached\" href=\"https://html.spec.whatwg.org/multipage/structured-data.html#detached\">[[Detached]]</a>internal slot is true, then\n return <a id=\"the-offscreencanvas-interface:a-promise-rejected-with\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> an<a id=\"the-offscreencanvas-interface:invalidstateerror-6\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a>\n <code id=\"the-offscreencanvas-interface:domexception-6\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16784
16784
},
16785
16785
{
16786
-
"html": "<p>If this <code id=\"the-offscreencanvas-interface:offscreencanvas-29\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-mode\" id=\"the-offscreencanvas-interface:offscreencanvas-context-mode-9\">context mode</a> is <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-2d\" id=\"the-offscreencanvas-interface:offscreencanvas-context-2d-4\">2d</a> and the rendering context's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#output-bitmap\" id=\"the-offscreencanvas-interface:output-bitmap\">output\n bitmap</a>'s <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-offscreencanvas-interface:concept-canvas-origin-clean\">origin-clean</a> flag is set to\n false, then return <a id=\"the-offscreencanvas-interface:a-promise-rejected-with-2\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> a\n <a id=\"the-offscreencanvas-interface:securityerror\" href=\"https://webidl.spec.whatwg.org/#securityerror\" data-x-internal=\"securityerror\">\"<code>SecurityError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-7\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16786
+
"html": "<p>If <a id=\"the-offscreencanvas-interface:this-16\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-mode\" id=\"the-offscreencanvas-interface:offscreencanvas-context-mode-9\">context mode</a> is\n <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-2d\" id=\"the-offscreencanvas-interface:offscreencanvas-context-2d-4\">2d</a> and the rendering context's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#output-bitmap\" id=\"the-offscreencanvas-interface:output-bitmap\">output\n bitmap</a>'s <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-origin-clean\" id=\"the-offscreencanvas-interface:concept-canvas-origin-clean\">origin-clean</a> flag is set to\n false, then return <a id=\"the-offscreencanvas-interface:a-promise-rejected-with-2\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> a\n <a id=\"the-offscreencanvas-interface:securityerror\" href=\"https://webidl.spec.whatwg.org/#securityerror\" data-x-internal=\"securityerror\">\"<code>SecurityError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-7\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16787
16787
},
16788
16788
{
16789
-
"html": "<p>If this <code id=\"the-offscreencanvas-interface:offscreencanvas-30\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-9\">bitmap</a> has no pixels (i.e., either its horizontal\n dimension or its vertical dimension is zero) then return <a id=\"the-offscreencanvas-interface:a-promise-rejected-with-3\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a promise rejected with</a> an\n <a id=\"the-offscreencanvas-interface:indexsizeerror\" href=\"https://webidl.spec.whatwg.org/#indexsizeerror\" data-x-internal=\"indexsizeerror\">\"<code>IndexSizeError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-8\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16789
+
"html": "<p>If <a id=\"the-offscreencanvas-interface:this-17\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-9\">bitmap</a> has no pixels\n (i.e., either its horizontal dimension or its vertical dimension is zero), then return <a id=\"the-offscreencanvas-interface:a-promise-rejected-with-3\" href=\"https://webidl.spec.whatwg.org/#a-promise-rejected-with\" data-x-internal=\"a-promise-rejected-with\">a\n promise rejected with</a> an <a id=\"the-offscreencanvas-interface:indexsizeerror\" href=\"https://webidl.spec.whatwg.org/#indexsizeerror\" data-x-internal=\"indexsizeerror\">\"<code>IndexSizeError</code>\"</a>\n <code id=\"the-offscreencanvas-interface:domexception-8\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16790
16790
},
16791
16791
{
16792
-
"html": "<p>Let <var>bitmap</var> be a copy of this <code id=\"the-offscreencanvas-interface:offscreencanvas-31\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-10\">bitmap</a>.</p>"
16792
+
"html": "<p>Let <var>bitmap</var> be a copy of <a id=\"the-offscreencanvas-interface:this-18\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-10\">bitmap</a>.</p>"
16793
16793
},
16794
16794
{
16795
16795
"html": "<p>Let <var>result</var> be a new promise object.</p>"
@@ -16802,14 +16802,14 @@
16802
16802
"html": "<p>Let <var>file</var> be <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#a-serialisation-of-the-bitmap-as-a-file\" id=\"the-offscreencanvas-interface:a-serialisation-of-the-bitmap-as-a-file\">a\n serialization of <var>bitmap</var> as a file</a>, with <var>options</var>'s <dfn id=\"image-encode-options-type\"><code>type</code></dfn> and <dfn id=\"image-encode-options-quality\"><code>quality</code></dfn> if present.</p>"
16803
16803
},
16804
16804
{
16805
-
"html": "<a id=\"the-offscreencanvas-interface:queue-an-element-task\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-an-element-task\">Queue an element task</a> on the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#canvas-blob-serialisation-task-source\" id=\"the-offscreencanvas-interface:canvas-blob-serialisation-task-source\">canvas blob serialization task\n source</a> given the <code id=\"the-offscreencanvas-interface:the-canvas-element-2\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#the-canvas-element\">canvas</a></code> element to run these steps:",
16805
+
"html": "<a id=\"the-offscreencanvas-interface:queue-a-global-task\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-global-task\">Queue a global task</a> on the <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#canvas-blob-serialisation-task-source\" id=\"the-offscreencanvas-interface:canvas-blob-serialisation-task-source\">canvas blob serialization task source</a>\n given <a id=\"the-offscreencanvas-interface:this-19\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a id=\"the-offscreencanvas-interface:concept-relevant-global-2\" href=\"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global\">relevant global object</a> to run these steps:",
16806
16806
"rationale": "if",
16807
16807
"steps": [
16808
16808
{
16809
16809
"html": "<p>If <var>file</var> is null, then reject <var>result</var> with an\n <a id=\"the-offscreencanvas-interface:encodingerror\" href=\"https://webidl.spec.whatwg.org/#encodingerror\" data-x-internal=\"encodingerror\">\"<code>EncodingError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-9\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16810
16810
},
16811
16811
{
16812
-
"html": "<p>Otherwise, resolve <var>result</var> with a new <code id=\"the-offscreencanvas-interface:blob-3\"><a data-x-internal=\"blob\" href=\"https://w3c.github.io/FileAPI/#dfn-Blob\">Blob</a></code> object, created in\n the <a href=\"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm\" id=\"the-offscreencanvas-interface:concept-relevant-realm\">relevant realm</a> of this\n <code id=\"the-offscreencanvas-interface:offscreencanvas-32\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object, representing <var>file</var>.\n <a href=\"https://html.spec.whatwg.org/multipage/references.html#refsFILEAPI\">[FILEAPI]</a></p>"
16812
+
"html": "<p>Otherwise, resolve <var>result</var> with a new <code id=\"the-offscreencanvas-interface:blob-3\"><a data-x-internal=\"blob\" href=\"https://w3c.github.io/FileAPI/#dfn-Blob\">Blob</a></code> object, created in\n <a id=\"the-offscreencanvas-interface:this-20\" href=\"https://webidl.spec.whatwg.org/#this\" data-x-internal=\"this\">this</a>'s <a href=\"https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm\" id=\"the-offscreencanvas-interface:concept-relevant-realm\">relevant realm</a>, representing\n <var>file</var>. <a href=\"https://html.spec.whatwg.org/multipage/references.html#refsFILEAPI\">[FILEAPI]</a></p>"
16813
16813
}
16814
16814
]
16815
16815
}
@@ -16827,16 +16827,16 @@
16827
16827
"rationale": "if",
16828
16828
"steps": [
16829
16829
{
16830
-
"html": "<p>If the value of this <code id=\"the-offscreencanvas-interface:offscreencanvas-33\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a id=\"the-offscreencanvas-interface:detached-2\" href=\"https://html.spec.whatwg.org/multipage/structured-data.html#detached\">[[Detached]]</a>\n internal slot is set to true, then throw an <a id=\"the-offscreencanvas-interface:invalidstateerror-7\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a>\n <code id=\"the-offscreencanvas-interface:domexception-10\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16830
+
"html": "<p>If the value of this <code id=\"the-offscreencanvas-interface:offscreencanvas-28\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a id=\"the-offscreencanvas-interface:detached-2\" href=\"https://html.spec.whatwg.org/multipage/structured-data.html#detached\">[[Detached]]</a>\n internal slot is set to true, then throw an <a id=\"the-offscreencanvas-interface:invalidstateerror-7\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a>\n <code id=\"the-offscreencanvas-interface:domexception-10\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16831
16831
},
16832
16832
{
16833
-
"html": "<p>If this <code id=\"the-offscreencanvas-interface:offscreencanvas-34\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-mode\" id=\"the-offscreencanvas-interface:offscreencanvas-context-mode-10\">context mode</a> is set to <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-none\" id=\"the-offscreencanvas-interface:offscreencanvas-context-none-3\">none</a>, then throw an\n <a id=\"the-offscreencanvas-interface:invalidstateerror-8\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-11\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16833
+
"html": "<p>If this <code id=\"the-offscreencanvas-interface:offscreencanvas-29\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-mode\" id=\"the-offscreencanvas-interface:offscreencanvas-context-mode-10\">context mode</a> is set to <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-context-none\" id=\"the-offscreencanvas-interface:offscreencanvas-context-none-3\">none</a>, then throw an\n <a id=\"the-offscreencanvas-interface:invalidstateerror-8\" href=\"https://webidl.spec.whatwg.org/#invalidstateerror\" data-x-internal=\"invalidstateerror\">\"<code>InvalidStateError</code>\"</a> <code id=\"the-offscreencanvas-interface:domexception-11\"><a data-x-internal=\"domexception\" href=\"https://webidl.spec.whatwg.org/#dfn-DOMException\">DOMException</a></code>.</p>"
16834
16834
},
16835
16835
{
16836
-
"html": "<p>Let <var>image</var> be a newly created <code id=\"the-offscreencanvas-interface:imagebitmap-3\"><a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmap\">ImageBitmap</a></code> object that references\n the same underlying bitmap data as this <code id=\"the-offscreencanvas-interface:offscreencanvas-35\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-11\">bitmap</a>.</p>"
16836
+
"html": "<p>Let <var>image</var> be a newly created <code id=\"the-offscreencanvas-interface:imagebitmap-3\"><a href=\"https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmap\">ImageBitmap</a></code> object that references\n the same underlying bitmap data as this <code id=\"the-offscreencanvas-interface:offscreencanvas-30\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-11\">bitmap</a>.</p>"
16837
16837
},
16838
16838
{
16839
-
"html": "<p>Set this <code id=\"the-offscreencanvas-interface:offscreencanvas-36\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-12\">bitmap</a> to reference a newly created bitmap of the same\n dimensions and color space as the previous bitmap, and with its pixels initialized to\n <a id=\"the-offscreencanvas-interface:transparent-black-5\" href=\"https://drafts.csswg.org/css-color/#transparent-black\" data-x-internal=\"transparent-black\">transparent black</a>, or <a id=\"the-offscreencanvas-interface:opaque-black\" href=\"https://drafts.csswg.org/css-color/#opaque-black\" data-x-internal=\"opaque-black\">opaque black</a> if the rendering context's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-alpha\" id=\"the-offscreencanvas-interface:concept-canvas-alpha\">alpha</a> is false.</p>"
16839
+
"html": "<p>Set this <code id=\"the-offscreencanvas-interface:offscreencanvas-31\"><a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas\">OffscreenCanvas</a></code> object's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas-bitmap\" id=\"the-offscreencanvas-interface:offscreencanvas-bitmap-12\">bitmap</a> to reference a newly created bitmap of the same\n dimensions and color space as the previous bitmap, and with its pixels initialized to\n <a id=\"the-offscreencanvas-interface:transparent-black-5\" href=\"https://drafts.csswg.org/css-color/#transparent-black\" data-x-internal=\"transparent-black\">transparent black</a>, or <a id=\"the-offscreencanvas-interface:opaque-black\" href=\"https://drafts.csswg.org/css-color/#opaque-black\" data-x-internal=\"opaque-black\">opaque black</a> if the rendering context's <a href=\"https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-alpha\" id=\"the-offscreencanvas-interface:concept-canvas-alpha\">alpha</a> is false.</p>"
0 commit comments