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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 12219002: 'Moved all documentation from old .dartdoc files.' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/docs/docs.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 0893c12f7d3280a1e395d73cdc062b9fddcc5bbe..49a4effb4690b02b858fd51dfc88201b69d1cabe 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -7770,14 +7770,27 @@ class DocumentFragment extends Node {
this.nodes.addAll(nodes);
}
+ /**
+ * Adds the specified element after the last child of this
+ * document fragment.
+ */
void append(Element element) {
this.children.add(element);
}
+ /**
+ * Adds the specified text as a text node after the last child of this
+ * document fragment.
+ */
void appendText(String text) {
this.nodes.add(new Text(text));
}
+
+ /**
+ * Parses the specified text as HTML and adds the resulting node after the
+ * last child of this document fragment.
+ */
void appendHtml(String text) {
this.nodes.add(new DocumentFragment.html(text));
}
@@ -23448,6 +23461,31 @@ class SqlTransactionSync extends NativeFieldWrapperClass1 {
// BSD-style license that can be found in the LICENSE file.
+/**
+ * The type used by the
+ * [Window.localStorage] and [Window.sessionStorage] properties.
+ * Storage is implemented as a Map<String, String>.
+ *
+ * To store and get values, use Dart's built-in map syntax:
+ *
+ * window.localStorage['key1'] = 'val1';
+ * window.localStorage['key2'] = 'val2';
+ * window.localStorage['key3'] = 'val3';
+ * assert(window.localStorage['key3'] == 'val3');
+ *
+ * You can use [Map](http://api.dartlang.org/dart_core/Map.html) APIs
+ * such as containsValue(), clear(), and length:
+ *
+ * assert(window.localStorage.containsValue('does not exist') == false);
+ * window.localStorage.clear();
+ * assert(window.localStorage.length == 0);
+ *
+ * For more examples of using this API, see
+ * [localstorage_test.dart](http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/tests/html/localstorage_test.dart).
+ * For details on using the Map API, see the
+ * [Maps](http://www.dartlang.org/docs/library-tour/#maps-aka-dictionaries-or-hashes)
+ * section of the library tour.
+ */
@DomName('Storage')
class Storage extends NativeFieldWrapperClass1 implements Map<String, String>
{
@@ -28476,6 +28514,40 @@ class WebKitNamedFlow extends EventTarget {
@DocsEditable
+/**
+ * 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.on.message.add((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.
+ */
@DomName('WebSocket')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/docs/docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698