| Index: dart/pkg/custom_element/lib/custom_element.dart
|
| ===================================================================
|
| --- dart/pkg/custom_element/lib/custom_element.dart (revision 29808)
|
| +++ dart/pkg/custom_element/lib/custom_element.dart (working copy)
|
| @@ -35,7 +35,6 @@
|
| /** The web component element wrapped by this class. */
|
| Element _host;
|
| List _shadowRoots;
|
| - _AttributeMap _attributes;
|
|
|
| /**
|
| * Shadow roots generated by dwc for each custom element, indexed by the
|
| @@ -107,7 +106,8 @@
|
| void leftView() {}
|
|
|
| /** Invoked when any attribute of the component is modified. */
|
| - void attributeChanged(String name, String oldValue) {}
|
| + void attributeChanged(String name, String oldValue, String newValue) =>
|
| + host.attributeChanged(name, oldValue, newValue);
|
|
|
| // TODO(efortuna): Update these when we decide what to do with these
|
| // properties.
|
| @@ -155,7 +155,7 @@
|
|
|
| String get nodeName => host.nodeName;
|
|
|
| - Document get document => host.document;
|
| + Document get ownerDocument => host.ownerDocument;
|
|
|
| Node get previousNode => host.previousNode;
|
|
|
| @@ -173,12 +173,9 @@
|
| Node insertAllBefore(Iterable<Node> newChild, Node refChild) =>
|
| host.insertAllBefore(newChild, refChild);
|
|
|
| - Map<String, String> get attributes {
|
| - if (_attributes == null) _attributes = new _AttributeMap(this);
|
| - return _attributes;
|
| - }
|
| + Map<String, String> get attributes => host.attributes;
|
| set attributes(Map<String, String> value) {
|
| - (attributes as _AttributeMap)._replaceAll(value);
|
| + host.attributes = value;
|
| }
|
|
|
| List<Element> get elements => host.children;
|
| @@ -237,12 +234,6 @@
|
| String get id => host.id;
|
| set id(String v) { host.id = v; }
|
|
|
| - String get innerHTML => host.innerHtml;
|
| -
|
| - void set innerHTML(String v) {
|
| - host.innerHtml = v;
|
| - }
|
| -
|
| String get innerHtml => host.innerHtml;
|
| void set innerHtml(String v) {
|
| host.innerHtml = v;
|
| @@ -253,10 +244,6 @@
|
| host.setInnerHtml(html, validator: validator, treeSanitizer: treeSanitizer);
|
| }
|
|
|
| - void set unsafeInnerHtml(String html) {
|
| - host.unsafeInnerHtml = html;
|
| - }
|
| -
|
| DocumentFragment createFragment(String html,
|
| {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) =>
|
| host.createFragment(html,
|
| @@ -359,10 +346,17 @@
|
|
|
| void requestPointerLock() { host.requestPointerLock(); }
|
|
|
| - Element query(String selectors) => host.query(selectors);
|
| + Element querySelector(String selectors) => host.querySelector(selectors);
|
|
|
| - ElementList queryAll(String selectors) => host.queryAll(selectors);
|
| + ElementList querySelectorAll(String selectors) =>
|
| + host.querySelectorAll(selectors);
|
|
|
| + @deprecated
|
| + Element query(String selectors) => host.querySelector(selectors);
|
| +
|
| + @deprecated
|
| + ElementList queryAll(String selectors) => host.querySelectorAll(selectors);
|
| +
|
| String get className => host.className;
|
| set className(String value) { host.className = value; }
|
|
|
| @@ -423,16 +417,16 @@
|
|
|
| int get nodeType => host.nodeType;
|
|
|
| - void $dom_addEventListener(String type, EventListener listener,
|
| - [bool useCapture]) {
|
| - host.$dom_addEventListener(type, listener, useCapture);
|
| + void addEventListener(String type, EventListener listener,
|
| + [bool useCapture]) {
|
| + host.addEventListener(type, listener, useCapture);
|
| }
|
|
|
| bool dispatchEvent(Event event) => host.dispatchEvent(event);
|
|
|
| - void $dom_removeEventListener(String type, EventListener listener,
|
| - [bool useCapture]) {
|
| - host.$dom_removeEventListener(type, listener, useCapture);
|
| + void removeEventListener(String type, EventListener listener,
|
| + [bool useCapture]) {
|
| + host.removeEventListener(type, listener, useCapture);
|
| }
|
|
|
| get xtag => host.xtag;
|
|
|