blob: e09502602c69847f72e379ff9695b620ff2da4ef [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;
/**
* The base class for all documents.
*
* Each web page loaded in the browser has its own [Document] object, which is
* typically an [HtmlDocument].
*
* If you aren't comfortable with DOM concepts, see the Dart tutorial
* [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).
*/
$(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($dom_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
}
}