blob: 7cc7f09e64e32251e884536000fd1dddb7f12b2f [file] [log] [blame]
// 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
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
@DocsEditable
$(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME extends Node $NATIVESPEC
{
$!MEMBERS
/**
* Finds all descendant elements of this document that match the specified
* group of selectors.
*
* Unless your webpage contains multiple documents, the top-level queryAll
* 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 items = document.queryAll('.itemClassName');
*
* For details about CSS selector syntax, see the
* [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
*/
ElementList queryAll(String selectors) {
return new _FrozenElementList._wrap(_querySelectorAll(selectors));
}
/// Checks if [register] is supported on the current platform.
bool get supportsRegister {
$if DART2JS
return JS('bool', '("register" in #)', this);
$else
return true;
$endif
}
@DomName('Document.createElement')
Element createElement(String tagName, [String typeExtension]) {
$if DART2JS
return _createElement(tagName, typeExtension);
$else
if (typeExtension != null) {
return _createElement(tagName, typeExtension);
} else {
// Fast-path for Dartium when typeExtension is not needed.
return _Utils.createElement(this, tagName);
}
$endif
}
}