| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // https://html.spec.whatwg.org/multipage/scripting.html#the-offscreencanvas-int
erface | 5 // https://html.spec.whatwg.org/multipage/scripting.html#the-offscreencanvas-int
erface |
| 6 | 6 |
| 7 [ | 7 [ |
| 8 Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long
height), | 8 Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long
height), |
| 9 Exposed=(Window,Worker), | 9 Exposed=(Window,Worker), |
| 10 RuntimeEnabled=ExperimentalCanvasFeatures, | 10 RuntimeEnabled=ExperimentalCanvasFeatures, |
| 11 MeasureAs=OffscreenCanvas, | 11 MeasureAs=OffscreenCanvas, |
| 12 ] interface OffscreenCanvas : EventTarget { | 12 ] interface OffscreenCanvas : EventTarget { |
| 13 [EnforceRange] attribute unsigned long width; | 13 [EnforceRange] attribute unsigned long width; |
| 14 [EnforceRange] attribute unsigned long height; | 14 [EnforceRange] attribute unsigned long height; |
| 15 | 15 |
| 16 [CallWith=ScriptState, RaisesException] ImageBitmap transferToImageBitmap(); | 16 [CallWith=ScriptState, RaisesException] ImageBitmap transferToImageBitmap(); |
| 17 [RaisesException, CallWith=ScriptState] Promise<Blob> convertToBlob(optional
ImageEncodeOptions options); | 17 [MeasureAs=OffscreenCanvasConvertToBlob, RaisesException, CallWith=ScriptSta
te] Promise<Blob> convertToBlob(optional ImageEncodeOptions options); |
| 18 }; | 18 }; |
| OLD | NEW |