Revert all html warning changes.

For the sake of ease of cherry-picking, I'm going to back this change out to
apply all at once, once I fix this postMessage test failure on Dartium.

BUG=

Review URL: https://codereview.chromium.org//160963004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32630 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
efortuna@google.com 2014-02-12 22:12:18 +00:00
parent 4c9a2cea15
commit 7acd2cc7c7
17 changed files with 116 additions and 250 deletions

View file

@ -249,6 +249,8 @@ class CustomElement implements Element {
host.createFragment(html,
validator: validator, treeSanitizer: treeSanitizer);
InputMethodContext get inputMethodContext => host.inputMethodContext;
bool get isContentEditable => host.isContentEditable;
String get lang => host.lang;

View file

@ -111,7 +111,7 @@ abstract class _EntryArray implements List<Entry> native "EntryArray" {}
@DocsEditable()
@DomName('AbstractWorker')
abstract class AbstractWorker extends Interceptor implements EventTarget native "AbstractWorker" {
class AbstractWorker extends Interceptor implements EventTarget native "AbstractWorker" {
// To suppress missing implicit constructor warnings.
factory AbstractWorker._() { throw new UnsupportedError("Not supported"); }
@ -266,12 +266,6 @@ class AnchorElement extends HtmlElement implements UrlUtils native "HTMLAnchorEl
@DocsEditable()
String href;
@DomName('HTMLAnchorElement.origin')
@DocsEditable()
// WebKit only
@Experimental() // non-standard
final String origin;
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
@ -7849,19 +7843,16 @@ class DocumentFragment extends Node implements ParentNode native "DocumentFragme
validator: validator, treeSanitizer: treeSanitizer);
}
HtmlCollection get _children => throw new UnimplementedError(
'Use _docChildren instead');
// Native field is used only by Dart code so does not lead to instantiation
// of native classes
@Creates('Null')
List<Element> _docChildren;
List<Element> _children;
List<Element> get children {
if (_docChildren == null) {
_docChildren = new FilteredElementList(this);
if (_children == null) {
_children = new FilteredElementList(this);
}
return _docChildren;
return _children;
}
void set children(List<Element> value) {
@ -10910,6 +10901,19 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode,
@DocsEditable()
bool hidden;
/**
* The current state of IME composition.
*
* ## Other resources
*
* * [Input method editor specification]
* (http://www.w3.org/TR/ime-api/) from W3C.
*/
@DomName('Element.inputMethodContext')
@DocsEditable()
@Experimental() // untriaged
final InputMethodContext inputMethodContext;
@DomName('Element.isContentEditable')
@DocsEditable()
final bool isContentEditable;
@ -14508,6 +14512,10 @@ class HtmlDocument extends Document native "HTMLDocument" {
class HtmlFormControlsCollection extends HtmlCollection native "HTMLFormControlsCollection" {
// To suppress missing implicit constructor warnings.
factory HtmlFormControlsCollection._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLFormControlsCollection.__getter__')
@DocsEditable()
Node __getter__(int index) native;
}
// 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
@ -14604,6 +14612,17 @@ class HttpRequest extends HttpRequestEventTarget native "XMLHttpRequest" {
*
* This is similar to [request] but specialized for HTTP GET requests which
* return text content.
*
* To add query parameters, append them to the [url] following a `?`,
* joining each key to its value with `=` and separating key-value pairs with
* `&`.
*
* var name = Uri.encodeQueryComponent('John');
* var id = Uri.encodeQueryComponent('42');
* HttpRequest.getString('users.json?name=$name&id=$id')
* .then((HttpRequest resp) {
* // Do something with the response.
* });
*
* See also:
*
@ -14622,6 +14641,20 @@ class HttpRequest extends HttpRequestEventTarget native "XMLHttpRequest" {
* to sending a FormData object with broader browser support but limited to
* String values.
*
* If [data] is supplied, the key/value pairs are URI encoded with
* [Uri.encodeQueryComponent] and converted into an HTTP query string.
*
* Unless otherwise specified, this method appends the following header:
*
* Content-Type: application/x-www-form-urlencoded; charset=UTF-8
*
* Here's an example of using this method:
*
* var data = { 'firstName' : 'John', 'lastName' : 'Doe' };
* HttpRequest.postFormData('/send', data).then((HttpRequest resp) {
* // Do something with the response.
* });
*
* See also:
*
* * [request]
@ -14673,6 +14706,25 @@ class HttpRequest extends HttpRequestEventTarget native "XMLHttpRequest" {
* * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
* * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
*
*
* The following is equivalent to the [getString] sample above:
*
* var name = Uri.encodeQueryComponent('John');
* var id = Uri.encodeQueryComponent('42');
* HttpRequest.request('users.json?name=$name&id=$id')
* .then((HttpRequest resp) {
* // Do something with the response.
* });
*
* Here's an example of submitting an entire form with [FormData].
*
* var myForm = querySelector('form#myForm');
* var data = new FormData(myForm);
* HttpRequest.request('/submit', method: 'POST', sendData: data)
* .then((HttpRequest resp) {
* // Do something with the response.
* });
*
* Note that requests for file:// URIs are only supported by Chrome extensions
* with appropriate permissions in their manifest. Requests to file:// URIs
* will also never fail- the Future will always complete successfully, even
@ -29175,15 +29227,6 @@ class _BeforeUnloadEventStreamProvider implements
String getEventType(EventTarget target) {
return _eventType;
}
ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false}) {
return new _ElementEventStreamImpl(e, _eventType, useCapture);
}
ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
{bool useCapture: false}) {
return new _ElementListEventStreamImpl(e, _eventType, useCapture);
}
}
// 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
@ -29213,6 +29256,11 @@ abstract class WindowEventHandlers extends EventTarget {
// To suppress missing implicit constructor warnings.
factory WindowEventHandlers._() { throw new UnsupportedError("Not supported"); }
@DomName('WindowEventHandlers.beforeunloadEvent')
@DocsEditable()
@Experimental() // untriaged
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
@DomName('WindowEventHandlers.hashchangeEvent')
@DocsEditable()
@Experimental() // untriaged
@ -29253,6 +29301,11 @@ abstract class WindowEventHandlers extends EventTarget {
@Experimental() // untriaged
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DomName('WindowEventHandlers.onbeforeunload')
@DocsEditable()
@Experimental() // untriaged
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
@DomName('WindowEventHandlers.onhashchange')
@DocsEditable()
@Experimental() // untriaged
@ -31580,7 +31633,7 @@ abstract class CanvasImageSource {}
* * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
* * [Window](http://www.w3.org/TR/Window/) from the W3C.
*/
abstract class WindowBase {
abstract class WindowBase implements EventTarget {
// Fields.
/**
@ -32653,9 +32706,6 @@ class _CustomEventStreamProvider<T extends Event>
String getEventType(EventTarget target) {
return _eventTypeGetter(target);
}
String get _eventType =>
throw new UnsupportedError('Access type through getEventType method.');
}
// DO NOT EDIT- this file is generated from running tool/generator.sh.
@ -34890,10 +34940,6 @@ abstract class ReadyState {
*/
class _WrappedEvent implements Event {
final Event wrapped;
/** The CSS selector involved with event delegation. */
String _selector;
_WrappedEvent(this.wrapped);
bool get bubbles => wrapped.bubbles;
@ -34931,43 +34977,6 @@ class _WrappedEvent implements Event {
void stopPropagation() {
wrapped.stopPropagation();
}
/**
* A pointer to the element whose CSS selector matched within which an event
* was fired. If this Event was not associated with any Event delegation,
* accessing this value will throw an [UnsupportedError].
*/
Element get matchingTarget {
if (_selector == null) {
throw new UnsupportedError('Cannot call matchingTarget if this Event did'
' not arise as a result of event delegation.');
}
var currentTarget = this.currentTarget;
var target = this.target;
var matchedTarget;
do {
if (target.matches(_selector)) return target;
target = target.parent;
} while (target != null && target != currentTarget.parent);
throw new StateError('No selector matched for populating matchedTarget.');
}
/**
* This event's path, taking into account shadow DOM.
*
* ## Other resources
*
* * [Shadow DOM extensions to Event]
* (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
* W3C.
*/
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
@Experimental()
List<Node> get path => wrapped.path;
dynamic get _get_currentTarget => wrapped._get_currentTarget;
dynamic get _get_target => wrapped._get_target;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@ -35621,17 +35630,6 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
@Experimental() // untriaged
bool getModifierState(String keyArgument) => throw new UnimplementedError();
@Experimental() // untriaged
int get location => throw new UnimplementedError();
@Experimental() // untriaged
bool get repeat => throw new UnimplementedError();
dynamic get _get_view => throw new UnimplementedError();
}
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a

View file

@ -101,7 +101,7 @@ HtmlDocument get document {
@DocsEditable()
@DomName('AbstractWorker')
abstract class AbstractWorker extends NativeFieldWrapperClass2 implements EventTarget {
class AbstractWorker extends NativeFieldWrapperClass2 implements EventTarget {
// To suppress missing implicit constructor warnings.
factory AbstractWorker._() { throw new UnsupportedError("Not supported"); }
@ -304,12 +304,6 @@ class AnchorElement extends HtmlElement implements UrlUtils {
@DocsEditable()
void set href(String value) native "HTMLAnchorElement_href_Setter";
@DomName('HTMLAnchorElement.origin')
@DocsEditable()
// WebKit only
@Experimental() // non-standard
String get origin native "HTMLAnchorElement_origin_Getter";
@DomName('HTMLAnchorElement.password')
@DocsEditable()
@Experimental() // untriaged
@ -8297,16 +8291,13 @@ class DocumentFragment extends Node implements ParentNode {
validator: validator, treeSanitizer: treeSanitizer);
}
HtmlCollection get _children => throw new UnimplementedError(
'Use _docChildren instead');
List<Element> _docChildren;
List<Element> _children;
List<Element> get children {
if (_docChildren == null) {
_docChildren = new FilteredElementList(this);
if (_children == null) {
_children = new FilteredElementList(this);
}
return _docChildren;
return _children;
}
void set children(List<Element> value) {
@ -11195,6 +11186,8 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode,
bool hidden;
InputMethodContext get inputMethodContext;
bool get isContentEditable;
String lang;
@ -15603,6 +15596,10 @@ class HtmlFormControlsCollection extends HtmlCollection {
// To suppress missing implicit constructor warnings.
factory HtmlFormControlsCollection._() { throw new UnsupportedError("Not supported"); }
@DomName('HTMLFormControlsCollection.__getter__')
@DocsEditable()
Node __getter__(int index) native "HTMLFormControlsCollection___getter___Callback";
@DomName('HTMLFormControlsCollection.namedItem')
@DocsEditable()
Node namedItem(String name) native "HTMLFormControlsCollection_namedItem_Callback";
@ -31609,15 +31606,6 @@ class _BeforeUnloadEventStreamProvider implements
String getEventType(EventTarget target) {
return _eventType;
}
ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false}) {
return new _ElementEventStreamImpl(e, _eventType, useCapture);
}
ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
{bool useCapture: false}) {
return new _ElementListEventStreamImpl(e, _eventType, useCapture);
}
}
// 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
@ -31656,6 +31644,11 @@ abstract class WindowEventHandlers extends EventTarget {
// To suppress missing implicit constructor warnings.
factory WindowEventHandlers._() { throw new UnsupportedError("Not supported"); }
@DomName('WindowEventHandlers.beforeunloadEvent')
@DocsEditable()
@Experimental() // untriaged
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
@DomName('WindowEventHandlers.hashchangeEvent')
@DocsEditable()
@Experimental() // untriaged
@ -31696,6 +31689,11 @@ abstract class WindowEventHandlers extends EventTarget {
@Experimental() // untriaged
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DomName('WindowEventHandlers.onbeforeunload')
@DocsEditable()
@Experimental() // untriaged
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
@DomName('WindowEventHandlers.onhashchange')
@DocsEditable()
@Experimental() // untriaged
@ -33925,10 +33923,6 @@ abstract class _XMLHttpRequestProgressEvent extends ProgressEvent {
*/
class _WrappedEvent implements Event {
final Event wrapped;
/** The CSS selector involved with event delegation. */
String _selector;
_WrappedEvent(this.wrapped);
bool get bubbles => wrapped.bubbles;
@ -33966,43 +33960,6 @@ class _WrappedEvent implements Event {
void stopPropagation() {
wrapped.stopPropagation();
}
/**
* A pointer to the element whose CSS selector matched within which an event
* was fired. If this Event was not associated with any Event delegation,
* accessing this value will throw an [UnsupportedError].
*/
Element get matchingTarget {
if (_selector == null) {
throw new UnsupportedError('Cannot call matchingTarget if this Event did'
' not arise as a result of event delegation.');
}
var currentTarget = this.currentTarget;
var target = this.target;
var matchedTarget;
do {
if (target.matches(_selector)) return target;
target = target.parent;
} while (target != null && target != currentTarget.parent);
throw new StateError('No selector matched for populating matchedTarget.');
}
/**
* This event's path, taking into account shadow DOM.
*
* ## Other resources
*
* * [Shadow DOM extensions to Event]
* (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
* W3C.
*/
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
@Experimental()
List<Node> get path => wrapped.path;
dynamic get _get_currentTarget => wrapped._get_currentTarget;
dynamic get _get_target => wrapped._get_target;
}
// 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
@ -34336,7 +34293,7 @@ abstract class CanvasImageSource {}
* * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
* * [Window](http://www.w3.org/TR/Window/) from the W3C.
*/
abstract class WindowBase {
abstract class WindowBase implements EventTarget {
// Fields.
/**
@ -35409,9 +35366,6 @@ class _CustomEventStreamProvider<T extends Event>
String getEventType(EventTarget target) {
return _eventTypeGetter(target);
}
String get _eventType =>
throw new UnsupportedError('Access type through getEventType method.');
}
// DO NOT EDIT- this file is generated from running tool/generator.sh.
@ -38137,17 +38091,6 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
@Experimental() // untriaged
bool getModifierState(String keyArgument) => throw new UnimplementedError();
@Experimental() // untriaged
int get location => throw new UnimplementedError();
@Experimental() // untriaged
bool get repeat => throw new UnimplementedError();
dynamic get _get_view => throw new UnimplementedError();
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@ -38645,7 +38588,7 @@ class _Utils {
// TODO(vsm): Move these checks into native code.
ClassMirror cls = reflectClass(type);
if (_isBuiltinType(cls)) {
throw new UnsupportedError("Invalid custom element from ${(cls.owner as LibraryMirror).uri}.");
throw new UnsupportedError("Invalid custom element from ${cls.owner.uri}.");
}
var className = MirrorSystem.getName(cls.simpleName);
var createdConstructor = cls.declarations[new Symbol('$className.created')];

View file

@ -70,6 +70,6 @@ class Lists {
/**
* For accessing underlying node lists, for dart:js interop.
*/
abstract class NodeListWrapper {
class NodeListWrapper {
List<Node> get rawList;
}

View file

@ -22,6 +22,11 @@ import "package:async_helper/async_helper.dart";
const Map<String, List<String>> WHITE_LIST = const {
'html_dart2js.dart': const [
"doesn't implement", // Issue 16105.
"is not assignable to the type 'HtmlCollection'", // Issue 16105.
"is not a subtype of the overridden method type", // Issue 16105.
],
'html_common/lists.dart': const [
"has no implementation" // Issue 16105.
],
};

View file

@ -2241,8 +2241,6 @@
"support_level": "nonstandard"
},
"inputMethodContext": {
"comment": "http://www.w3.org/TR/ime-api/#the-inputmethodcontext-property Per the spec is only on HTMLElement.",
"dart_action": "suppress",
"support_level": "untriaged"
},
"insertAdjacentElement": {
@ -3382,6 +3380,7 @@
},
"origin": {
"comment": "WebKit only",
"dart_action": "suppress",
"support_level": "nonstandard"
},
"password": {

View file

@ -627,7 +627,6 @@ removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [
'HTMLDirectoryElement.*',
'HTMLDivElement.align',
'HTMLFontElement.*',
'HTMLFormControlsCollection.__getter__',
'HTMLFormElement.get:elements',
'HTMLFrameElement.*',
'HTMLFrameSetElement.*',
@ -754,7 +753,6 @@ removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [
'SVGElementInstance.on:wheel',
'WheelEvent.wheelDelta',
'Window.on:wheel',
'WindowEventHandlers.on:beforeUnload',
'WorkerGlobalScope.webkitIndexedDB',
# TODO(jacobr): should these be removed?
'Document.close',

View file

@ -1382,7 +1382,6 @@ class CPPLibraryEmitter():
is_node_test = lambda interface: interface.id == 'Node'
is_active_test = lambda interface: 'ActiveDOMObject' in interface.ext_attrs
is_event_target_test = lambda interface: 'EventTarget' in interface.ext_attrs
def TypeCheckHelper(test):
return 'true' if any(map(test, database.Hierarchy(interface))) else 'false'
for interface in database.GetInterfaces():

View file

@ -23,7 +23,7 @@ part of html;
* * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
* * [Window](http://www.w3.org/TR/Window/) from the W3C.
*/
abstract class WindowBase {
abstract class WindowBase implements EventTarget {
// Fields.
/**

View file

@ -428,7 +428,4 @@ class _CustomEventStreamProvider<T extends Event>
String getEventType(EventTarget target) {
return _eventTypeGetter(target);
}
String get _eventType =>
throw new UnsupportedError('Access type through getEventType method.');
}

View file

@ -9,10 +9,6 @@ part of dart.html;
*/
class _WrappedEvent implements Event {
final Event wrapped;
/** The CSS selector involved with event delegation. */
String _selector;
_WrappedEvent(this.wrapped);
bool get bubbles => wrapped.bubbles;
@ -50,41 +46,4 @@ class _WrappedEvent implements Event {
void stopPropagation() {
wrapped.stopPropagation();
}
/**
* A pointer to the element whose CSS selector matched within which an event
* was fired. If this Event was not associated with any Event delegation,
* accessing this value will throw an [UnsupportedError].
*/
Element get matchingTarget {
if (_selector == null) {
throw new UnsupportedError('Cannot call matchingTarget if this Event did'
' not arise as a result of event delegation.');
}
var currentTarget = this.currentTarget;
var target = this.target;
var matchedTarget;
do {
if (target.matches(_selector)) return target;
target = target.parent;
} while (target != null && target != currentTarget.parent);
throw new StateError('No selector matched for populating matchedTarget.');
}
/**
* This event's path, taking into account shadow DOM.
*
* ## Other resources
*
* * [Shadow DOM extensions to Event]
* (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
* W3C.
*/
// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
@Experimental()
List<Node> get path => wrapped.path;
dynamic get _get_currentTarget => wrapped._get_currentTarget;
dynamic get _get_target => wrapped._get_target;
}

View file

@ -210,15 +210,4 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
@Experimental() // untriaged
bool getModifierState(String keyArgument) => throw new UnimplementedError();
@Experimental() // untriaged
int get location => throw new UnimplementedError();
@Experimental() // untriaged
bool get repeat => throw new UnimplementedError();
dynamic get _get_view => throw new UnimplementedError();
}

View file

@ -129,15 +129,4 @@ class KeyEvent extends _WrappedEvent implements KeyboardEvent {
throw new UnsupportedError(
"Cannot initialize a KeyboardEvent from a KeyEvent.");
}
int get _layerX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _layerY => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageX => throw new UnsupportedError('Not applicable to KeyEvent');
int get _pageY => throw new UnsupportedError('Not applicable to KeyEvent');
@Experimental() // untriaged
bool getModifierState(String keyArgument) => throw new UnimplementedError();
@Experimental() // untriaged
int get location => throw new UnimplementedError();
@Experimental() // untriaged
bool get repeat => throw new UnimplementedError();
dynamic get _get_view => throw new UnimplementedError();
}

View file

@ -406,7 +406,7 @@ class _Utils {
// TODO(vsm): Move these checks into native code.
ClassMirror cls = reflectClass(type);
if (_isBuiltinType(cls)) {
throw new UnsupportedError("Invalid custom element from ${(cls.owner as LibraryMirror).uri}.");
throw new UnsupportedError("Invalid custom element from ${cls.owner.uri}.");
}
var className = MirrorSystem.getName(cls.simpleName);
var createdConstructor = cls.declarations[new Symbol('$className.created')];

View file

@ -5,5 +5,5 @@
part of $LIBRARYNAME;
@DocsEditable()
$(ANNOTATIONS)$(CLASS_MODIFIERS)abstract class $CLASSNAME$EXTENDS$MIXINS implements EventTarget$NATIVESPEC {
$(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$MIXINS implements EventTarget$NATIVESPEC {
$!MEMBERS}

View file

@ -21,21 +21,18 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
validator: validator, treeSanitizer: treeSanitizer);
}
HtmlCollection get _children => throw new UnimplementedError(
'Use _docChildren instead');
$if DART2JS
// Native field is used only by Dart code so does not lead to instantiation
// of native classes
@Creates('Null')
$endif
List<Element> _docChildren;
List<Element> _children;
List<Element> get children {
if (_docChildren == null) {
_docChildren = new FilteredElementList(this);
if (_children == null) {
_children = new FilteredElementList(this);
}
return _docChildren;
return _children;
}
void set children(List<Element> value) {

View file

@ -394,13 +394,4 @@ $endif
String getEventType(EventTarget target) {
return _eventType;
}
ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false}) {
return new _ElementEventStreamImpl(e, _eventType, useCapture);
}
ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
{bool useCapture: false}) {
return new _ElementListEventStreamImpl(e, _eventType, useCapture);
}
}