Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index 25e35392b3fe6cb6aecbde207f2c76e2df17e2c0..cbcf844180fc9dd1474fec2dd0673da2ed1218dc 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -1362,7 +1362,7 @@ class CSSPrimitiveValue extends CSSValue native "*CSSPrimitiveValue" { |
num getFloatValue(int unitType) native; |
/** @domName CSSPrimitiveValue.getRGBColorValue */ |
- RGBColor getRGBColorValue() native; |
+ RGBColor getRgbColorValue() native "getRGBColorValue"; |
/** @domName CSSPrimitiveValue.getRectValue */ |
Rect getRectValue() native; |
@@ -1452,7 +1452,7 @@ class CSSStyleDeclaration native "*CSSStyleDeclaration" { |
final CSSRule parentRule; |
/** @domName CSSStyleDeclaration.getPropertyCSSValue */ |
- CSSValue getPropertyCSSValue(String propertyName) native; |
+ CSSValue getPropertyCssValue(String propertyName) native "getPropertyCSSValue"; |
/** @domName CSSStyleDeclaration.getPropertyPriority */ |
String getPropertyPriority(String propertyName) native; |
@@ -4784,7 +4784,7 @@ class CanvasElement extends Element implements Element native "*HTMLCanvasElemen |
int width; |
/** @domName HTMLCanvasElement.toDataURL */ |
- String toDataURL(String type, [num quality]) native; |
+ String toDataUrl(String type, [num quality]) native "toDataURL"; |
CanvasRenderingContext getContext(String contextId) native; |
@@ -5638,7 +5638,7 @@ class DOMFileSystemSync native "*DOMFileSystemSync" { |
class DOMImplementation native "*DOMImplementation" { |
/** @domName DOMImplementation.createCSSStyleSheet */ |
- CSSStyleSheet createCSSStyleSheet(String title, String media) native; |
+ CSSStyleSheet createCssStyleSheet(String title, String media) native "createCSSStyleSheet"; |
Bob Nystrom
2012/11/20 00:35:10
Will "CSSStyleSheet" be renamed at some point?
blois
2012/11/20 00:44:41
Yes, I've been planning on renaming the classes as
|
/** @domName DOMImplementation.createDocument */ |
Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) native; |
@@ -5647,7 +5647,7 @@ class DOMImplementation native "*DOMImplementation" { |
DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native; |
/** @domName DOMImplementation.createHTMLDocument */ |
- HtmlDocument createHTMLDocument(String title) native; |
+ HtmlDocument createHtmlDocument(String title) native "createHTMLDocument"; |
/** @domName DOMImplementation.hasFeature */ |
bool hasFeature(String feature, String version) native; |
@@ -6539,7 +6539,7 @@ class Document extends Node native "*Document" |
Range $dom_caretRangeFromPoint(int x, int y) native "caretRangeFromPoint"; |
/** @domName Document.createCDATASection */ |
- CDATASection createCDATASection(String data) native; |
+ CDATASection createCDataSection(String data) native "createCDATASection"; |
/** @domName Document.createDocumentFragment */ |
DocumentFragment createDocumentFragment() native; |
@@ -6576,7 +6576,7 @@ class Document extends Node native "*Document" |
bool execCommand(String command, bool userInterface, String value) native; |
/** @domName Document.getCSSCanvasContext */ |
- CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int width, int height) native; |
+ CanvasRenderingContext getCssCanvasContext(String contextId, String name, int width, int height) native "getCSSCanvasContext"; |
/** @domName Document.getElementById */ |
Element $dom_getElementById(String elementId) native "getElementById"; |
@@ -6816,21 +6816,21 @@ class DocumentFragment extends Node native "*DocumentFragment" { |
List<Element> queryAll(String selectors) => |
new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); |
- String get innerHTML { |
+ String get innerHtml { |
final e = new Element.tag("div"); |
e.nodes.add(this.clone(true)); |
- return e.innerHTML; |
+ return e.innerHtml; |
} |
- String get outerHTML => innerHTML; |
+ String get outerHtml => innerHtml; |
- // TODO(nweiz): Do we want to support some variant of innerHTML for XML and/or |
+ // TODO(nweiz): Do we want to support some variant of innerHtml for XML and/or |
// SVG strings? |
- void set innerHTML(String value) { |
+ void set innerHtml(String value) { |
this.nodes.clear(); |
final e = new Element.tag("div"); |
- e.innerHTML = value; |
+ e.innerHtml = value; |
// Copy list first since we don't want liveness during iteration. |
List nodes = new List.from(e.nodes); |
@@ -6860,7 +6860,7 @@ class DocumentFragment extends Node native "*DocumentFragment" { |
this._insertAdjacentNode(where, new Text(text)); |
} |
- void insertAdjacentHTML(String where, String text) { |
+ void insertAdjacentHtml(String where, String text) { |
this._insertAdjacentNode(where, new DocumentFragment.html(text)); |
} |
@@ -6869,7 +6869,7 @@ class DocumentFragment extends Node native "*DocumentFragment" { |
} |
void addHtml(String text) { |
- this.insertAdjacentHTML('beforeend', text); |
+ this.insertAdjacentHtml('beforeend', text); |
} |
// If we can come up with a semi-reasonable default value for an Element |
@@ -7701,7 +7701,7 @@ abstract class Element extends Node implements ElementTraversal native "*Element |
* last child of this. |
*/ |
void addHtml(String text) { |
- this.insertAdjacentHTML('beforeend', text); |
+ this.insertAdjacentHtml('beforeend', text); |
} |
// Hooks to support custom WebComponents. |
@@ -7732,15 +7732,15 @@ abstract class Element extends Node implements ElementTraversal native "*Element |
native 'insertAdjacentText'; |
/** @domName Element.insertAdjacentHTML */ |
- void insertAdjacentHTML(String where, String text) { |
- if (JS('bool', '!!#.insertAdjacentHTML', this)) { |
- _insertAdjacentHTML(where, text); |
+ void insertAdjacentHtml(String where, String text) { |
+ if (JS('bool', '!!#.insertAdjacentHtml', this)) { |
+ _insertAdjacentHtml(where, text); |
} else { |
_insertAdjacentNode(where, new DocumentFragment.html(text)); |
} |
} |
- void _insertAdjacentHTML(String where, String text) |
+ void _insertAdjacentHtml(String where, String text) |
native 'insertAdjacentHTML'; |
/** @domName Element.insertAdjacentHTML */ |
@@ -7802,7 +7802,12 @@ abstract class Element extends Node implements ElementTraversal native "*Element |
String id; |
/** @domName HTMLElement.innerHTML */ |
- String innerHTML; |
+ String get innerHtml => JS("String", "#.innerHTML", this); |
+ |
+ /** @domName HTMLElement.innerHTML */ |
+ void set innerHtml(String value) { |
+ JS("void", "#.innerHTML = #", this, value); |
+ } |
/** @domName HTMLElement.isContentEditable */ |
final bool isContentEditable; |
@@ -7811,7 +7816,7 @@ abstract class Element extends Node implements ElementTraversal native "*Element |
String lang; |
/** @domName HTMLElement.outerHTML */ |
- final String outerHTML; |
+ String get outerHtml => JS("String", "#.outerHTML", this); |
/** @domName HTMLElement.spellcheck */ |
bool spellcheck; |
@@ -8000,7 +8005,7 @@ class _ElementFactoryProvider { |
} |
} |
final Element temp = new Element.tag(parentTag); |
- temp.innerHTML = html; |
+ temp.innerHtml = html; |
Element element; |
if (temp.children.length == 1) { |
@@ -8260,7 +8265,7 @@ class Entry native "*Entry" { |
void remove(VoidCallback successCallback, [ErrorCallback errorCallback]) native; |
/** @domName Entry.toURL */ |
- String toURL() native; |
+ String toUrl() native "toURL"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -8309,7 +8314,7 @@ class EntrySync native "*EntrySync" { |
void remove() native; |
/** @domName EntrySync.toURL */ |
- String toURL() native; |
+ String toUrl() native "toURL"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -8487,9 +8492,6 @@ class EventSource extends EventTarget native "*EventSource" { |
static const int OPEN = 1; |
- /** @domName EventSource.URL */ |
- final String URL; |
- |
/** @domName EventSource.readyState */ |
final int readyState; |
@@ -8803,7 +8805,7 @@ class FileReader extends EventTarget native "*FileReader" { |
void readAsBinaryString(Blob blob) native; |
/** @domName FileReader.readAsDataURL */ |
- void readAsDataURL(Blob blob) native; |
+ void readAsDataUrl(Blob blob) native "readAsDataURL"; |
/** @domName FileReader.readAsText */ |
void readAsText(Blob blob, [String encoding]) native; |
@@ -8844,7 +8846,7 @@ class FileReaderSync native "*FileReaderSync" { |
String readAsBinaryString(Blob blob) native; |
/** @domName FileReaderSync.readAsDataURL */ |
- String readAsDataURL(Blob blob) native; |
+ String readAsDataUrl(Blob blob) native "readAsDataURL"; |
/** @domName FileReaderSync.readAsText */ |
String readAsText(Blob blob, [String encoding]) native; |
@@ -9682,10 +9684,10 @@ class HTMLOptionsCollection extends HTMLCollection native "*HTMLOptionsCollectio |
class HashChangeEvent extends Event native "*HashChangeEvent" { |
/** @domName HashChangeEvent.newURL */ |
- final String newURL; |
+ String get newUrl => JS("String", "#.newURL", this); |
/** @domName HashChangeEvent.oldURL */ |
- final String oldURL; |
+ String get oldUrl => JS("String", "#.oldURL", this); |
/** @domName HashChangeEvent.initHashChangeEvent */ |
void initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native; |
@@ -9864,7 +9866,7 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" { |
String responseType; |
/** @domName XMLHttpRequest.responseXML */ |
- final Document responseXML; |
+ Document get responseXml => JS("Document", "#.responseXML", this); |
/** @domName XMLHttpRequest.status */ |
final int status; |
@@ -12173,7 +12175,7 @@ class LocalWindow extends EventTarget implements Window native "@*DOMWindow" { |
CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native "getComputedStyle"; |
/** @domName Window.getMatchedCSSRules */ |
- List<CSSRule> getMatchedCSSRules(Element element, String pseudoElement) native; |
+ List<CSSRule> getMatchedCssRules(Element element, String pseudoElement) native "getMatchedCSSRules"; |
/** @domName Window.getSelection */ |
DOMSelection getSelection() native; |
@@ -12254,7 +12256,7 @@ class LocalWindow extends EventTarget implements Window native "@*DOMWindow" { |
void webkitRequestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native; |
/** @domName DOMWindow.webkitResolveLocalFileSystemURL */ |
- void webkitResolveLocalFileSystemURL(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native; |
+ void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native "webkitResolveLocalFileSystemURL"; |
} |
@@ -12795,7 +12797,7 @@ class MediaKeyError native "*MediaKeyError" { |
class MediaKeyEvent extends Event native "*MediaKeyEvent" { |
/** @domName MediaKeyEvent.defaultURL */ |
- final String defaultURL; |
+ String get defaultUrl => JS("String", "#.defaultURL", this); |
/** @domName MediaKeyEvent.errorCode */ |
final MediaKeyError errorCode; |
@@ -14211,7 +14213,7 @@ class NotificationCenter native "*NotificationCenter" { |
int checkPermission() native; |
/** @domName NotificationCenter.createHTMLNotification */ |
- Notification createHTMLNotification(String url) native; |
+ Notification createHtmlNotification(String url) native "createHTMLNotification"; |
/** @domName NotificationCenter.createNotification */ |
Notification createNotification(String iconUrl, String title, String body) native; |
@@ -14264,16 +14266,16 @@ class OESVertexArrayObject native "*OESVertexArrayObject" { |
static const int VERTEX_ARRAY_BINDING_OES = 0x85B5; |
/** @domName OESVertexArrayObject.bindVertexArrayOES */ |
- void bindVertexArrayOES(WebGLVertexArrayObjectOES arrayObject) native; |
+ void bindVertexArrayOes(WebGLVertexArrayObjectOES arrayObject) native "bindVertexArrayOES"; |
Bob Nystrom
2012/11/20 00:35:10
Is "OES" here for "OpenGL ES"? If so, seems kind o
blois
2012/11/20 00:44:41
Done.
|
/** @domName OESVertexArrayObject.createVertexArrayOES */ |
- WebGLVertexArrayObjectOES createVertexArrayOES() native; |
+ WebGLVertexArrayObjectOES createVertexArrayOes() native "createVertexArrayOES"; |
/** @domName OESVertexArrayObject.deleteVertexArrayOES */ |
- void deleteVertexArrayOES(WebGLVertexArrayObjectOES arrayObject) native; |
+ void deleteVertexArrayOes(WebGLVertexArrayObjectOES arrayObject) native "deleteVertexArrayOES"; |
/** @domName OESVertexArrayObject.isVertexArrayOES */ |
- bool isVertexArrayOES(WebGLVertexArrayObjectOES arrayObject) native; |
+ bool isVertexArrayOes(WebGLVertexArrayObjectOES arrayObject) native "isVertexArrayOES"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -15972,7 +15974,7 @@ class ScriptProfile native "*ScriptProfile" { |
class ScriptProfileNode native "*ScriptProfileNode" { |
/** @domName ScriptProfileNode.callUID */ |
- final int callUID; |
+ int get callUid => JS("int", "#.callUID", this); |
/** @domName ScriptProfileNode.functionName */ |
final String functionName; |
@@ -16125,7 +16127,12 @@ class ShadowRoot extends DocumentFragment native "*ShadowRoot" { |
bool applyAuthorStyles; |
/** @domName ShadowRoot.innerHTML */ |
- String innerHTML; |
+ String get innerHtml => JS("String", "#.innerHTML", this); |
+ |
+ /** @domName ShadowRoot.innerHTML */ |
+ void set innerHtml(String value) { |
+ JS("void", "#.innerHTML = #", this, value); |
+ } |
/** @domName ShadowRoot.resetStyleInheritance */ |
bool resetStyleInheritance; |
@@ -17372,7 +17379,7 @@ class TextTrackCue extends EventTarget native "*TextTrackCue" { |
bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; |
/** @domName TextTrackCue.getCueAsHTML */ |
- DocumentFragment getCueAsHTML() native; |
+ DocumentFragment getCueAsHtml() native "getCueAsHTML"; |
/** @domName TextTrackCue.removeEventListener */ |
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "removeEventListener"; |
@@ -19862,7 +19869,7 @@ class WebSocket extends EventTarget native "*WebSocket" { |
static const int OPEN = 1; |
/** @domName WebSocket.URL */ |
- final String URL; |
+ String get Url => JS("String", "#.URL", this); |
/** @domName WebSocket.binaryType */ |
String binaryType; |
@@ -20112,10 +20119,10 @@ class WorkerContext extends EventTarget native "*WorkerContext" { |
DOMFileSystemSync webkitRequestFileSystemSync(int type, int size) native; |
/** @domName WorkerContext.webkitResolveLocalFileSystemSyncURL */ |
- EntrySync webkitResolveLocalFileSystemSyncURL(String url) native; |
+ EntrySync webkitResolveLocalFileSystemSyncUrl(String url) native "webkitResolveLocalFileSystemSyncURL"; |
/** @domName WorkerContext.webkitResolveLocalFileSystemURL */ |
- void webkitResolveLocalFileSystemURL(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native; |
+ void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native "webkitResolveLocalFileSystemURL"; |
} |
class WorkerContextEvents extends Events { |
@@ -20257,7 +20264,7 @@ class XPathExpression native "*XPathExpression" { |
class XPathNSResolver native "*XPathNSResolver" { |
/** @domName XPathNSResolver.lookupNamespaceURI */ |
- String lookupNamespaceURI(String prefix) native; |
+ String lookupNamespaceUri(String prefix) native "lookupNamespaceURI"; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -24009,7 +24016,7 @@ class _DocumentFragmentFactoryProvider { |
static DocumentFragment createDocumentFragment_html(String html) { |
final fragment = new DocumentFragment(); |
- fragment.innerHTML = html; |
+ fragment.innerHtml = html; |
return fragment; |
} |
@@ -24017,7 +24024,7 @@ class _DocumentFragmentFactoryProvider { |
// factory DocumentFragment.xml(String xml) { |
// final fragment = new DocumentFragment(); |
// final e = new XMLElement.tag("xml"); |
- // e.innerHTML = xml; |
+ // e.innerHtml = xml; |
// |
// // Copy list first since we don't want liveness during iteration. |
// final List nodes = new List.from(e.nodes); |
@@ -24028,7 +24035,7 @@ class _DocumentFragmentFactoryProvider { |
static DocumentFragment createDocumentFragment_svg(String svgContent) { |
final fragment = new DocumentFragment(); |
final e = new svg.SVGSVGElement(); |
- e.innerHTML = svgContent; |
+ e.innerHtml = svgContent; |
// Copy list first since we don't want liveness during iteration. |
final List nodes = new List.from(e.nodes); |