| // This file introduces / supplements and forces Dart declarations. |
| |
| [DartSupplemental, |
| Constructor] |
| interface AudioContext { |
| // TODO(ager): Auto-generate this custom method when the info about retaining |
| // typed arrays is in the IDL. |
| [Custom] void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallback, AudioBufferCallback errorCallback); |
| }; |
| |
| [DartSupplemental] |
| interface WaveShaperNode { |
| // TODO(ager): Auto-generate this custom method when the info about retaining |
| // typed arrays is in the IDL. |
| [Custom=Setter] attribute Float32Array curve; |
| }; |
| |
| [DartSupplemental] |
| interface AudioParam { |
| // TODO(ager): Auto-generate this custom method when the info about retaining |
| // typed arrays is in the IDL. |
| [Custom] void setValueCurveAtTime(Float32Array values, double time, double duration); |
| }; |
| |
| [DartSupplemental] |
| interface Document { |
| [Custom] Element createElement(DOMString tagName); |
| [Custom] Element createElement(DOMString localName, DOMString typeExtension); |
| [Custom] Element createElementNS(DOMString namespaceURI, DOMString qualifiedName); |
| [Custom] Element createElementNS(DOMString namespaceURI, DOMString qualifiedName, DOMString typeExtension); |
| }; |
| |
| [DartSupplemental] |
| interface Node { |
| [Custom] Node cloneNode([Default=Undefined] optional boolean deep); |
| [DartSuppress] readonly attribute Element nextElementSibling; |
| [DartSuppress] readonly attribute Element previousElementSibling; |
| }; |
| |
| [DartSupplemental] |
| interface ScriptProcessorNode { |
| [DartSuppress] attribute EventListener onaudioprocess; |
| [Custom] void _setEventListener(EventListener eventListener); |
| }; |
| |
| [DartSupplemental] |
| interface Element { |
| readonly attribute Element nextElementSibling; |
| readonly attribute Element previousElementSibling; |
| }; |
| |
| [DartSupplemental] |
| interface CharacterData { |
| readonly attribute Element nextElementSibling; |
| readonly attribute Element previousElementSibling; |
| }; |
| |
| [Callback] |
| interface TimeoutHandler { |
| void handleEvent(); |
| }; |
| |
| // FIXME(leafp): This is a temporary hack to get things running while |
| // we are still generating _blink from the dart side idl files. |
| // Once we are up and running generating dart:_blink in dartium |
| // this should go away. |
| [DartSupplemental] |
| interface URL { |
| [DartSuppress] static DOMString createObjectURL(WebKitMediaSource source); |
| }; |
| |
| [DartSupplemental] |
| interface CanvasRenderingContext2D { |
| [DartName=createImageDataFromImageData] ImageData createImageData(ImageData imagedata); |
| |
| // Removed in 1916. |
| [DartSuppress] void drawSystemFocusRing(Element element); |
| |
| [DartSuppress] void assert(boolean condition); |
| |
| [DartSuppress] attribute boolean webkitImageSmoothingEnabled; |
| |
| // Removed in 1985. |
| [DartSuppress] readonly attribute float webkitBackingStorePixelRatio; |
| }; |
| |
| interface HTMLCanvasElement { |
| [DartSuppress] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] DOMString type); |
| [Custom] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] DOMString type, optional float quality); |
| }; |
| |
| [DartSupplemental] |
| interface HTMLOptionsCollection { |
| [DartSuppress] void add(optional HTMLOptionElement element, optional long before); |
| [DartSuppress] void remove(HTMLOptionElement option); // Non standard. |
| }; |
| |
| [DartSupplemental] |
| interface HTMLSelectElement { |
| [DartSuppress] void add([Default=Undefined] HTMLElement element, [Default=Undefined] HTMLElement before); |
| [DartSuppress, Custom] void remove(); |
| [DartSuppress] void remove(long index); |
| [DartSuppress] void remove(HTMLOptionElement option); // Non standard. |
| }; |
| |
| [DartSupplemental] |
| interface HTMLMediaElement { |
| // Adding media events. |
| attribute EventListener oncanplay; |
| attribute EventListener oncanplaythrough; |
| attribute EventListener ondurationchange; |
| attribute EventListener onemptied; |
| attribute EventListener onended; |
| attribute EventListener onloadeddata; |
| attribute EventListener onloadedmetadata; |
| attribute EventListener onloadstart; |
| attribute EventListener onpause; |
| attribute EventListener onplay; |
| attribute EventListener onplaying; |
| attribute EventListener onprogress; |
| attribute EventListener onratechange; |
| attribute EventListener onseeked; |
| attribute EventListener onseeking; |
| attribute EventListener onshow; |
| attribute EventListener onstalled; |
| attribute EventListener onsuspend; |
| attribute EventListener ontimeupdate; |
| attribute EventListener onvolumechange; |
| attribute EventListener onwaiting; |
| }; |
| |
| [DartSupplemental] |
| interface RTCPeerConnection { |
| [DartSuppress, RaisesException] void addIceCandidate(RTCIceCandidate candidate); |
| }; |
| |
| [DartSupplemental] |
| interface WebGLContextEvent { |
| [DartSuppress] void initEvent(optional DOMString eventTypeArg, |
| optional boolean canBubbleArg, |
| optional boolean cancelableArg, |
| optional DOMString statusMessageArg); |
| }; |
| |
| [DartSupplemental] |
| interface WebGLRenderingContext { |
| |
| //void compressedTexImage2D(unsigned long target, long level, unsigned long internalformat, unsigned long width, unsigned long height, long border, unsigned long imageSize, const void* data); |
| //void compressedTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, unsigned long width, unsigned long height, unsigned long format, unsigned long imageSize, const void* data); |
| |
| [Custom] any getBufferParameter(unsigned long target, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getBufferParameter(); |
| |
| [Custom] any getFramebufferAttachmentParameter(unsigned long target, unsigned long attachment, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getFramebufferAttachmentParameter(); |
| |
| [Custom] any getParameter(unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getParameter(); |
| |
| [Custom] any getProgramParameter(WebGLProgram program, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getProgramParameter(); |
| |
| [Custom] any getRenderbufferParameter(unsigned long target, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getRenderbufferParameter(); |
| |
| [Custom] any getShaderParameter(WebGLShader shader, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getShaderParameter(); |
| |
| // TBD |
| // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); |
| |
| [Custom] any getExtension(DOMString name); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getExtension(DOMString name); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getSupportedExtensions(); |
| |
| [Custom] any getTexParameter(unsigned long target, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getTexParameter(); |
| |
| [Custom] any getUniform(WebGLProgram program, WebGLUniformLocation location); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getUniform(); |
| |
| [Custom] any getVertexAttrib(unsigned long index, unsigned long pname); |
| [DartSuppress, DartStrictTypeChecking, Custom] void getVertexAttrib(); |
| }; |
| |
| // TODO(vsm): Define new names for these (see b/4436830). |
| [DartSupplemental] |
| interface IDBCursor { |
| [DartName=next, CallWith=ExecutionContext, ImplementedAs=continueFunction, RaisesException] void continue([DartForceOptional] optional any key); |
| }; |
| [DartSupplemental] |
| interface IDBIndex { |
| [CallWith=ExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any key, [DartForceOptional] optional DOMString direction); |
| |
| [CallWith=ExecutionContext, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional any key, [DartForceOptional] optional DOMString direction); |
| |
| [CallWith=ExecutionContext, RaisesException] IDBRequest count([Default=Undefined] optional any key); |
| }; |
| |
| [DartSupplemental] |
| interface HTMLMediaElement { |
| DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=Undefined, TreatNullAs=NullString, TreatUndefinedAs=NullString, DartForceOptional] optional DOMString keySystem); |
| }; |
| |
| [DartSupplemental] |
| interface IDBKeyRange { |
| [DartName=only_] static IDBKeyRange only(any value); |
| [DartName=lowerBound_] static IDBKeyRange lowerBound(any bound, [DartForceOptional] optional boolean open); |
| [DartName=upperBound_] static IDBKeyRange upperBound(any bound, [DartForceOptional] optional boolean open); |
| [DartName=bound_] static IDBKeyRange bound(any lower, any upper, [DartForceOptional] optional boolean lowerOpen, [DartForceOptional] optional boolean upperOpen); |
| }; |
| |
| [DartSupplemental] |
| interface IDBObjectStore { |
| [CallWith=ScriptState, RaisesException] IDBRequest put(any value, [DartForceOptional] optional any key); |
| [CallWith=ScriptState, RaisesException] IDBRequest add(any value, [DartForceOptional] optional any key); |
| // [CallWith=ExecutionContext, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key); |
| [CallWith=ExecutionContext, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, [DartForceOptional] optional DOMString direction); |
| [CallWith=ExecutionContext, RaisesException] IDBRequest count([Default=Undefined] any key); |
| }; |
| |
| interface EntrySync { |
| // Native implementation is declared to return EntrySync. |
| [DartSuppress] DirectoryEntrySync getParent(); |
| EntrySync getParent(); |
| }; |
| |
| [DartSupplemental, |
| CustomConstructor, |
| Constructor(Array blobParts, optional DOMString type, optional DOMString endings) |
| ] |
| interface Blob { |
| }; |
| |
| [DartSupplemental, |
| Constructor(float x, float y) |
| ] |
| interface WebKitPoint { |
| }; |
| |
| [DartSupplemental, Callback] // Add missing Callback attribute. |
| interface VoidCallback { |
| }; |
| |
| interface SVGNumber { |
| [DartStrictTypeChecking, Custom] attribute float value; |
| }; |
| |
| // Keep it in to generate Dart code, C++ implementation is filterd out in generator. |
| [Callback] |
| interface MutationCallback { |
| [Custom] boolean handleEvent(MutationRecordArray mutations, MutationObserver observer); |
| }; |
| |
| [DartSupplemental, |
| CustomConstructor, |
| // Provide missing constructor signature. |
| Constructor(MutationCallback callback)] |
| interface MutationObserver { |
| }; |
| |
| [DartSupplemental, |
| CustomConstructor, |
| // Provide missing constructor signature. |
| Constructor(optional HTMLFormElement form)] |
| interface FormData { |
| [DartSuppress] void append(DOMString name, DOMString value, DOMString filename); |
| [Custom] void append(DOMString name, DOMString value); |
| [Custom] void append(DOMString name, Blob value, optional DOMString filename); |
| }; |
| |
| [DartSupplemental, Constructor] |
| interface XMLHttpRequest { |
| [Custom] void send(); |
| [Custom] void send(ArrayBuffer data); // FIXME: this should be eventually deprecated. |
| [Custom] void send(ArrayBufferView data); |
| [Custom] void send(Blob data); |
| [Custom] void send(Document data); |
| [Custom] void send([DartStrictTypeChecking] DOMString data); |
| [Custom] void send(FormData data); |
| }; |
| |
| [DartSuppress] |
| interface AbstractView {}; |
| |
| interface InjectedScriptHost { |
| [Custom] void inspect(any objectId, any hints); |
| [DartSuppress, Custom] any inspectedObject(long num); |
| [DartSuppress, Custom] any internalConstructorName(any obj); |
| [DartSuppress, Custom] boolean isHTMLAllCollection(any obj); |
| [DartSuppress, Custom] DOMString type(any obj); |
| [DartSuppress, Custom] any functionDetails(any obj); |
| [DartSuppress, Custom] any[] getInternalProperties(any obj); |
| [DartSuppress, Custom] EventListener[] getEventListeners(EventTarget target); |
| [DartSuppress, Custom] any evaluate(DOMString text); |
| [DartSuppress, Custom] void debugFunction(any fn); |
| [DartSuppress, Custom] void undebugFunction(any fn); |
| [DartSuppress, Custom] void monitorFunction(any fn); |
| [DartSuppress, Custom] void unmonitorFunction(any fn); |
| |
| // Only declarative scope (local, with and catch) is accepted. Returns undefined. |
| [DartSuppress, Custom] any setFunctionVariableValue(any functionObject, long scopeIndex, DOMString variableName, any newValue); |
| }; |
| |
| |
| |
| [DartSuppress] |
| interface JavaScriptCallFrame {}; |
| |
| |
| [DartSupplemental] |
| interface Location { |
| [Custom=Setter] attribute DOMString href; |
| |
| [Custom] void assign(optional DOMString url); |
| [Custom] void replace([Default=Undefined] optional DOMString url); |
| [Custom] void reload(); |
| |
| // URI decomposition attributes |
| [Custom=Setter] attribute DOMString protocol; |
| [Custom=Setter] attribute DOMString host; |
| [Custom=Setter] attribute DOMString hostname; |
| [Custom=Setter] attribute DOMString port; |
| [Custom=Setter] attribute DOMString pathname; |
| [Custom=Setter] attribute DOMString search; |
| [Custom=Setter] attribute DOMString hash; |
| }; |
| |
| // TODO(jacobr): reenable these new Blink features. |
| [DartSuppress] |
| interface ImageBitmapFactories {}; |
| |
| // See https://chromiumcodereview.appspot.com/15901002 for the V8 implementation of |
| // TextEncoder/TextDecoder |
| [DartSuppress] |
| interface TextEncoder {}; |
| |
| [DartSuppress] |
| interface TextDecoder {}; |
| |
| [DartSupplemental] |
| interface Window : EventTarget { |
| [DartSuppress] void alert(); |
| [DartSuppress] void alert(DOMString message); |
| void alert(optional DOMString message); |
| |
| [DartSuppress] void scrollBy(long x, long y); |
| [DartSuppress] void scrollBy(long x, long y, Dictionary scrollOptions); |
| [RaisesException] void scrollBy(long x, long y, optional Dictionary scrollOptions); |
| |
| [DartSuppress] void scrollTo(long x, long y); |
| [DartSuppress] void scrollTo(long x, long y, Dictionary scrollOptions); |
| [RaisesException] void scrollTo(long x, long y, optional Dictionary scrollOptions); |
| |
| [DartSuppress] void scroll(long x, long y); |
| [DartSuppress] void scroll(long x, long y, Dictionary scrollOptions); |
| [RaisesException] void scroll(long x, long y, optional Dictionary scrollOptions); |
| }; |
| |
| [DartSuppress] |
| interface Promise {}; |
| |
| [DartSupplemental] interface CanvasRenderingContext2D { |
| [DartSuppress] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy); |
| [DartSuppress] void webkitPutImageDataHD(ImageData? imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight); |
| [DartSuppress] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh); |
| }; |
| |
| [DartSupplemental] interface AudioParam { |
| [DartSuppress] void setTargetValueAtTime(float target, double time, double timeConstant); |
| void setTargetAtTime(float target, double time, double timeConstant); |
| }; |
| |
| [DartSupplemental] interface AudioContext { |
| // Number of AudioBufferSourceNodes that are currently playing. |
| [DartSuppress] readonly attribute unsigned long activeSourceCount; |
| [DartSuppress] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels); |
| [DartSuppress] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixToMono); |
| [DartSuppress] GainNode createGainNode(); |
| [DartSuppress] DelayNode createDelayNode(optional double maxDelayTime); |
| }; |
| |
| [DartSupplemental] interface HTMLInputElement { |
| [DartSuppress] attribute boolean webkitSpeech; |
| [DartSuppress] attribute boolean webkitGrammar; |
| }; |
| |
| [DartSupplemental] interface ShadowRoot { |
| [DartSuppress] attribute boolean applyAuthorStyles; |
| }; |
| |
| [DartSupplemental] interface BeforeLoadEvent { |
| [DartSuppress] readonly attribute DOMString url; |
| }; |
| |
| [DartSupplemental] interface OscillatorNode { |
| [DartSuppress] readonly attribute unsigned short playbackState; |
| }; |
| |
| [DartSupplemental] interface SVGElementInstance { |
| [DartSuppress] readonly attribute SVGElementInstanceList childNodes; |
| }; |
| |
| [DartSupplemental] interface DOMImplementation { |
| [DartSuppress] |
| CSSStyleSheet createCSSStyleSheet([Default=Undefined] optional DOMString title, |
| [Default=Undefined] optional DOMString media); |
| }; |
| |
| [DartSupplemental] interface SVGSVGElement { |
| [DartSuppress] attribute DOMString contentStyleType; |
| [DartSuppress] attribute DOMString contentScriptType; |
| }; |
| |
| [DartSupplemental] interface WorkerGlobalScope { |
| [DartSuppress] readonly attribute NotificationCenter webkitNotifications; |
| }; |
| |
| [DartSupplemental] interface AudioBuffer { |
| [DartSuppress] attribute float gain; |
| }; |
| |
| [DartSupplemental] interface WorkerCrypto { |
| [DartSuppress] ArrayBufferView getRandomValues(ArrayBufferView array); |
| }; |
| |
| [DartSupplemental] interface HTMLFormElement { |
| void requestAutocomplete([Default=Undefined] optional Dictionary details); |
| [DartSuppress] void requestAutocomplete(); |
| }; |
| |
| [DartSupplemental] interface AudioBufferSourceNode { |
| [DartSuppress] readonly attribute unsigned short playbackState; |
| }; |
| |
| [DartSupplemental] interface AudioBufferSourceNode : AudioSourceNode { |
| [DartSuppress] readonly attribute AudioParam gain; |
| }; |
| |
| // Remove backward compatible operation requestPointerLock exist now too. |
| [DartSupplemental] interface Element : Node { |
| [DartSuppress] void webkitRequestPointerLock(); |
| }; |
| |
| [DartSupplemental] interface CSSStyleDeclaration { |
| // Expose __propertyQuery__ a getter with a special operation in the IDL |
| // when used with Custom=PropertyQuery will emit __propertyQuery__. |
| [Custom=PropertyQuery] getter boolean (DOMString name); |
| }; |
| |
| Element implements GlobalEventHandlers; |