b73395196c
From dartium revision, inlined createElement, so it's no longer getting this doc comment. Also, this was recently made public as there are valid use cases for it, so the comment was misleading. TBR BUG= Review URL: https://codereview.chromium.org//24571003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27923 260f80e4-7a28-3924-810f-c04153c831b5
552 lines
21 KiB
JSON
552 lines
21 KiB
JSON
{
|
|
"dart.dom.html": {
|
|
"CanvasGradient": {
|
|
"comment": [
|
|
"/**",
|
|
" * An opaque canvas object representing a gradient.",
|
|
" *",
|
|
" * Created by calling [createLinearGradient] or [createRadialGradient] on a",
|
|
" * [CanvasRenderingContext2D] object.",
|
|
" *",
|
|
" * Example usage:",
|
|
" *",
|
|
" * var canvas = new CanvasElement(width: 600, height: 600);",
|
|
" * var ctx = canvas.context2D;",
|
|
" * ctx.clearRect(0, 0, 600, 600);",
|
|
" * ctx.save();",
|
|
" * // Create radial gradient.",
|
|
" * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600);",
|
|
" * gradient.addColorStop(0, '#000');",
|
|
" * gradient.addColorStop(1, 'rgb(255, 255, 255)');",
|
|
" * // Assign gradients to fill.",
|
|
" * ctx.fillStyle = gradient;",
|
|
" * // Draw a rectangle with a gradient fill.",
|
|
" * ctx.fillRect(0, 0, 600, 600);",
|
|
" * ctx.save();",
|
|
" * document.body.children.add(canvas);",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradient) from MDN.",
|
|
" * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasgradient) from whatwg.",
|
|
" * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgradient) from W3C.",
|
|
" */"
|
|
],
|
|
"members": {
|
|
"addColorStop": [
|
|
"/**",
|
|
" * Adds a color stop to this gradient at the offset.",
|
|
" *",
|
|
" * The [offset] can range between 0.0 and 1.0.",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linear-gradient#Gradient_with_multiple_color_stops) from MDN.",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"CanvasPattern": {
|
|
"comment": [
|
|
"/**",
|
|
" * An opaque object representing a pattern of image, canvas, or video.",
|
|
" *",
|
|
" * Created by calling [createPattern] on a [CanvasRenderingContext2D] object.",
|
|
" *",
|
|
" * Example usage:",
|
|
" *",
|
|
" * var canvas = new CanvasElement(width: 600, height: 600);",
|
|
" * var ctx = canvas.context2D;",
|
|
" * var img = new ImageElement();",
|
|
" * // Image src needs to be loaded before pattern is applied.",
|
|
" * img.onLoad.listen((event) {",
|
|
" * // When the image is loaded, create a pattern",
|
|
" * // from the ImageElement.",
|
|
" * CanvasPattern pattern = ctx.createPattern(img, 'repeat');",
|
|
" * ctx.rect(0, 0, canvas.width, canvas.height);",
|
|
" * ctx.fillStyle = pattern;",
|
|
" * ctx.fill();",
|
|
" * });",
|
|
" * img.src = \"images/foo.jpg\";",
|
|
" * document.body.children.add(canvas);",
|
|
" *",
|
|
" * See also:",
|
|
" * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern) from MDN.",
|
|
" * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspattern) from whatwg.",
|
|
" * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspattern) from W3C.",
|
|
" */"
|
|
]
|
|
},
|
|
"CanvasRenderingContext": {
|
|
"comment": [
|
|
"/**",
|
|
" * A rendering context for a canvas element.",
|
|
" *",
|
|
" * This context is extended by [CanvasRenderingContext2D] and",
|
|
" * [WebGLRenderingContext].",
|
|
" */"
|
|
],
|
|
"members": {
|
|
"canvas": [
|
|
"/// Reference to the canvas element to which this context belongs."
|
|
]
|
|
}
|
|
},
|
|
"Clipboard": {
|
|
"members": {
|
|
"getData": [
|
|
"/**",
|
|
" * Gets the data for the specified type.",
|
|
" *",
|
|
" * The data is only available from within a drop operation (such as an",
|
|
" * [Element.onDrop] event) and will return `null` before the event is",
|
|
" * triggered.",
|
|
" *",
|
|
" * Data transfer is prohibited across domains. If a drag originates",
|
|
" * from content from another domain or protocol (HTTP vs HTTPS) then the",
|
|
" * data cannot be accessed.",
|
|
" *",
|
|
" * The [type] can have values such as:",
|
|
" *",
|
|
" * * `'Text'`",
|
|
" * * `'URL'`",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"Document": {
|
|
"comment": [
|
|
"/**",
|
|
" * The base class for all documents.",
|
|
" *",
|
|
" * Each web page loaded in the browser has its own [Document] object, which is",
|
|
" * typically an [HtmlDocument].",
|
|
" *",
|
|
" * If you aren't comfortable with DOM concepts, see the Dart tutorial",
|
|
" * [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).",
|
|
" */"
|
|
],
|
|
"members": {
|
|
"querySelector": [
|
|
"/**",
|
|
" * Finds the first descendant element of this document that matches the",
|
|
" * specified group of selectors.",
|
|
" *",
|
|
" * Unless your webpage contains multiple documents, the top-level query",
|
|
" * method behaves the same as this method, so you should use it instead to",
|
|
" * save typing a few characters.",
|
|
" *",
|
|
" * [selectors] should be a string using CSS selector syntax.",
|
|
" * var element1 = document.query('.className');",
|
|
" * var element2 = document.query('#id');",
|
|
" *",
|
|
" * For details about CSS selector syntax, see the",
|
|
" * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"Element": {
|
|
"comment": [
|
|
"/**",
|
|
" * An abstract class, which all HTML elements extend.",
|
|
" */"
|
|
],
|
|
"members": {
|
|
"querySelector": [
|
|
"/**",
|
|
" * Finds the first descendant element of this element that matches the",
|
|
" * specified group of selectors.",
|
|
" *",
|
|
" * [selectors] should be a string using CSS selector syntax.",
|
|
" *",
|
|
" * // Gets the first descendant with the class 'classname'",
|
|
" * var element = element.query('.className');",
|
|
" * // Gets the element with id 'id'",
|
|
" * var element = element.query('#id');",
|
|
" * // Gets the first descendant [ImageElement]",
|
|
" * var img = element.query('img');",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [CSS Selectors](http://docs.webplatform.org/wiki/css/selectors)",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"HTMLAreaElement": {
|
|
"comment": [
|
|
"/**",
|
|
" * DOM Area Element, which links regions of an image map with a hyperlink.",
|
|
" *",
|
|
" * The element can also define an uninteractive region of the map.",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [<area>](https://developer.mozilla.org/en-US/docs/HTML/Element/area)",
|
|
" * on MDN.",
|
|
" */"
|
|
]
|
|
},
|
|
"HTMLCanvasElement": {
|
|
"members": {
|
|
"height": [
|
|
"/// The height of this canvas element in CSS pixels."
|
|
],
|
|
"width": [
|
|
"/// The width of this canvas element in CSS pixels."
|
|
]
|
|
}
|
|
},
|
|
"HTMLDivElement": {
|
|
"comment": [
|
|
"/**",
|
|
" * A generic container for content on an HTML page;",
|
|
" * corresponds to the <div> tag.",
|
|
" *",
|
|
" * The [DivElement] is a generic container and does not have any semantic",
|
|
" * significance. It is functionally similar to [SpanElement].",
|
|
" *",
|
|
" * The [DivElement] is a block-level element, as opposed to [SpanElement],",
|
|
" * which is an inline-level element.",
|
|
" *",
|
|
" * Example usage:",
|
|
" *",
|
|
" * DivElement div = new DivElement();",
|
|
" * div.text = 'Here's my new DivElem",
|
|
" * document.body.elements.add(elem);",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C.",
|
|
" * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) from W3C.",
|
|
" * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes) from W3C.",
|
|
" */"
|
|
]
|
|
},
|
|
"HTMLHRElement": {
|
|
"comment": [
|
|
"/**",
|
|
" * An `<hr>` tag.",
|
|
" */"
|
|
]
|
|
},
|
|
"HTMLMenuElement": {
|
|
"comment": [
|
|
"/**",
|
|
" * An HTML <menu> element.",
|
|
" *",
|
|
" * A <menu> element represents an unordered list of menu commands.",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.",
|
|
" * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.",
|
|
" */"
|
|
]
|
|
},
|
|
"Node": {
|
|
"members": {
|
|
"appendChild": [
|
|
"/**",
|
|
" * Adds a node to the end of the child [nodes] list of this node.",
|
|
" *",
|
|
" * If the node already exists in this document, it will be removed from its",
|
|
" * current parent node, then added to this node.",
|
|
" *",
|
|
" * This method is more efficient than `nodes.add`, and is the preferred",
|
|
" * way of appending a child node.",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"WebSocket": {
|
|
"comment": [
|
|
"/**",
|
|
" * Use the WebSocket interface to connect to a WebSocket,",
|
|
" * and to send and receive data on that WebSocket.",
|
|
" *",
|
|
" * To use a WebSocket in your web app, first create a WebSocket object,",
|
|
" * passing the WebSocket URL as an argument to the constructor.",
|
|
" *",
|
|
" * var webSocket = new WebSocket('ws://127.0.0.1:1337/ws');",
|
|
" *",
|
|
" * To send data on the WebSocket, use the [send] method.",
|
|
" *",
|
|
" * if (webSocket != null && webSocket.readyState == WebSocket.OPEN) {",
|
|
" * webSocket.send(data);",
|
|
" * } else {",
|
|
" * print('WebSocket not connected, message $data not sent');",
|
|
" * }",
|
|
" *",
|
|
" * To receive data on the WebSocket, register a listener for message events.",
|
|
" *",
|
|
" * webSocket.onMessage.listen((MessageEvent e) {",
|
|
" * receivedData(e.data);",
|
|
" * });",
|
|
" *",
|
|
" * The message event handler receives a [MessageEvent] object",
|
|
" * as its sole argument.",
|
|
" * You can also define open, close, and error handlers,",
|
|
" * as specified by [WebSocketEvents].",
|
|
" *",
|
|
" * For more information, see the",
|
|
" * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets)",
|
|
" * section of the library tour and",
|
|
" * [Introducing WebSockets](http://www.html5rocks.com/en/tutorials/websockets/basics/),",
|
|
" * an HTML5Rocks.com tutorial.",
|
|
" */"
|
|
],
|
|
"members": {
|
|
"send": [
|
|
"/**",
|
|
" * Transmit data to the server over this connection.",
|
|
" *",
|
|
" * This method accepts data of type [Blob], [ByteBuffer], [String], or",
|
|
" * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],",
|
|
" * or [sendTypedData], in constrast, only accept data of the specified type.",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"XMLHttpRequest": {
|
|
"members": {
|
|
"abort": [
|
|
"/**",
|
|
" * Stop the current request.",
|
|
" *",
|
|
" * The request can only be stopped if readyState is `HEADERS_RECIEVED` or",
|
|
" * `LOADING`. If this method is not in the process of being sent, the method",
|
|
" * has no effect.",
|
|
" */"
|
|
],
|
|
"getAllResponseHeaders": [
|
|
"/**",
|
|
" * Retrieve all the response headers from a request.",
|
|
" *",
|
|
" * `null` if no headers have been received. For multipart requests,",
|
|
" * `getAllResponseHeaders` will return the response headers for the current",
|
|
" * part of the request.",
|
|
" *",
|
|
" * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)",
|
|
" * for a list of common response headers.",
|
|
" */"
|
|
],
|
|
"getResponseHeader": [
|
|
"/**",
|
|
" * Return the response header named `header`, or `null` if not found.",
|
|
" *",
|
|
" * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Responses)",
|
|
" * for a list of common response headers.",
|
|
" */"
|
|
],
|
|
"onreadystatechange": [
|
|
"/**",
|
|
" * Event listeners to be notified every time the [HttpRequest]",
|
|
" * object's `readyState` changes values.",
|
|
" */"
|
|
],
|
|
"open": [
|
|
"/**",
|
|
" * Specify the desired `url`, and `method` to use in making the request.",
|
|
" *",
|
|
" * By default the request is done asyncronously, with no user or password",
|
|
" * authentication information. If `async` is false, the request will be send",
|
|
" * synchronously.",
|
|
" *",
|
|
" * Calling `open` again on a currently active request is equivalent to",
|
|
" * calling `abort`.",
|
|
" *",
|
|
" * Note: Most simple HTTP requests can be accomplished using the [getString],",
|
|
" * [request], [requestCrossOrigin], or [postFormData] methods. Use of this",
|
|
" * `open` method is intended only for more complext HTTP requests where",
|
|
" * finer-grained control is needed.",
|
|
" */"
|
|
],
|
|
"overrideMimeType": [
|
|
"/**",
|
|
" * Specify a particular MIME type (such as `text/xml`) desired for the",
|
|
" * response.",
|
|
" *",
|
|
" * This value must be set before the request has been sent. See also the list",
|
|
" * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types)",
|
|
" */"
|
|
],
|
|
"readyState": [
|
|
"/**",
|
|
" * Indicator of the current state of the request:",
|
|
" *",
|
|
" * <table>",
|
|
" * <tr>",
|
|
" * <td>Value</td>",
|
|
" * <td>State</td>",
|
|
" * <td>Meaning</td>",
|
|
" * </tr>",
|
|
" * <tr>",
|
|
" * <td>0</td>",
|
|
" * <td>unsent</td>",
|
|
" * <td><code>open()</code> has not yet been called</td>",
|
|
" * </tr>",
|
|
" * <tr>",
|
|
" * <td>1</td>",
|
|
" * <td>opened</td>",
|
|
" * <td><code>send()</code> has not yet been called</td>",
|
|
" * </tr>",
|
|
" * <tr>",
|
|
" * <td>2</td>",
|
|
" * <td>headers received</td>",
|
|
" * <td><code>sent()</code> has been called; response headers and <code>status</code> are available</td>",
|
|
" * </tr>",
|
|
" * <tr>",
|
|
" * <td>3</td> <td>loading</td> <td><code>responseText</code> holds some data</td>",
|
|
" * </tr>",
|
|
" * <tr>",
|
|
" * <td>4</td> <td>done</td> <td>request is complete</td>",
|
|
" * </tr>",
|
|
" * </table>",
|
|
" */"
|
|
],
|
|
"response": [
|
|
"/**",
|
|
" * The data received as a reponse from the request.",
|
|
" *",
|
|
" * The data could be in the",
|
|
" * form of a [String], [ByteBuffer], [Document], [Blob], or json (also a",
|
|
" * [String]). `null` indicates request failure.",
|
|
" */"
|
|
],
|
|
"responseText": [
|
|
"/**",
|
|
" * The response in string form or `null on failure.",
|
|
" */"
|
|
],
|
|
"responseType": [
|
|
"/**",
|
|
" * [String] telling the server the desired response format.",
|
|
" *",
|
|
" * Default is `String`.",
|
|
" * Other options are one of 'arraybuffer', 'blob', 'document', 'json',",
|
|
" * 'text'. Some newer browsers will throw NS_ERROR_DOM_INVALID_ACCESS_ERR if",
|
|
" * `responseType` is set while performing a synchronous request.",
|
|
" *",
|
|
" * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType)",
|
|
" */"
|
|
],
|
|
"responseXML": [
|
|
"/**",
|
|
" * The request response, or null on failure.",
|
|
" *",
|
|
" * The response is processed as",
|
|
" * `text/xml` stream, unless responseType = 'document' and the request is",
|
|
" * synchronous.",
|
|
" */"
|
|
],
|
|
"send": [
|
|
"/**",
|
|
" * Send the request with any given `data`.",
|
|
" *",
|
|
" * Note: Most simple HTTP requests can be accomplished using the [getString],",
|
|
" * [request], [requestCrossOrigin], or [postFormData] methods. Use of this",
|
|
" * `send` method is intended only for more complext HTTP requests where",
|
|
" * finer-grained control is needed.",
|
|
" *",
|
|
" * See also:",
|
|
" *",
|
|
" * * [send](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#send%28%29)",
|
|
" * from MDN.",
|
|
" */"
|
|
],
|
|
"status": [
|
|
"/**",
|
|
" * The http result code from the request (200, 404, etc).",
|
|
" * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)",
|
|
" */"
|
|
],
|
|
"statusText": [
|
|
"/**",
|
|
" * The request response string (such as \\\"200 OK\\\").",
|
|
" * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes)",
|
|
" */"
|
|
],
|
|
"upload": [
|
|
"/**",
|
|
" * [EventTarget] that can hold listeners to track the progress of the request.",
|
|
" * The events fired will be members of [HttpRequestUploadEvents].",
|
|
" */"
|
|
],
|
|
"withCredentials": [
|
|
"/**",
|
|
" * True if cross-site requests should use credentials such as cookies",
|
|
" * or authorization headers; false otherwise.",
|
|
" *",
|
|
" * This value is ignored for same-site requests.",
|
|
" */"
|
|
],
|
|
"XMLHttpRequest": [
|
|
"/**",
|
|
" * General constructor for any type of request (GET, POST, etc).",
|
|
" *",
|
|
" * This call is used in conjunction with [open]:",
|
|
" *",
|
|
" * var request = new HttpRequest();",
|
|
" * request.open('GET', 'http://dartlang.org');",
|
|
" * request.onLoad.listen((event) => print(",
|
|
" * 'Request complete ${event.target.reponseText}'));",
|
|
" * request.send();",
|
|
" *",
|
|
" * is the (more verbose) equivalent of",
|
|
" *",
|
|
" * HttpRequest.getString('http://dartlang.org').then(",
|
|
" * (result) => print('Request complete: $result'));",
|
|
" */"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"dart.dom.indexed_db": {
|
|
"IDBDatabase": {
|
|
"comment": [
|
|
"/**",
|
|
" * An indexed database object for storing client-side data",
|
|
" * in web apps.",
|
|
" */"
|
|
]
|
|
}
|
|
},
|
|
"dart.dom.web_audio": {
|
|
"ScriptProcessorNode": {
|
|
"members": {
|
|
"onaudioprocess": [
|
|
"/**",
|
|
" * Get a Stream that fires events when AudioProcessingEvents occur.",
|
|
" * This particular stream is special in that it only allows one listener to a",
|
|
" * given stream. Converting the returned Stream [asBroadcast] will likely ruin",
|
|
" * the soft-real-time properties which which these events are fired and can",
|
|
" * be processed.",
|
|
" */"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"dart.dom.web_sql": {
|
|
"Database": {
|
|
"members": {
|
|
"changeVersion": [
|
|
"/**",
|
|
" * Atomically update the database version to [newVersion], asynchronously",
|
|
" * running [callback] on the [SqlTransaction] representing this",
|
|
" * [changeVersion] transaction.",
|
|
" *",
|
|
" * If [callback] runs successfully, then [successCallback] is called.",
|
|
" * Otherwise, [errorCallback] is called.",
|
|
" *",
|
|
" * [oldVersion] should match the database's current [version] exactly.",
|
|
" *",
|
|
" * * [Database.changeVersion](http://www.w3.org/TR/webdatabase/#dom-database-changeversion) from W3C.",
|
|
" */"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|