Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.idl

Issue 1761003003: Use a union typdef for the return type of canvas.getContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final touches Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // https://html.spec.whatwg.org/#the-canvas-element
6
7 typedef (CanvasRenderingContext2D or
8 WebGLRenderingContext or
9 WebGL2RenderingContext or
10 ImageBitmapRenderingContext) RenderingContext;
11
12 partial interface HTMLCanvasElement
13 {
14 // The PermissiveDictionaryConversion extended attribute is needed to allow the
15 // autogenerated code to match the behavior of the custom binding. Web IDL
16 // requires throwing TypeError if the incoming argument is not an object typ e
17 // (and is not undefined or null). The binding must ignore this.
18 // Related spec issue: https://github.com/whatwg/html/issues/595
19 RenderingContext? getContext(DOMString contextId, [PermissiveDictionaryConve rsion] optional CanvasContextCreationAttributes attributes);
20 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698