gecko-dev/dom/webidl/ParentNode.webidl
Brian Grinstead 6a6ca1a08c Bug 1475342 - Move document.getElementsByAttribute[NS] to ParentNode so it'll work for HTML document and elements;r=bz
It's currently only accessible on XULDocument and XULElement, but that makes porting existing
JS to run in an HTML document inconvenient. We could alternatively change calling JS, but
this can be easily moved and exposed in chrome contexts.

MozReview-Commit-ID: JitYET20NSE

--HG--
extra : rebase_source : 75d823c688cba8d84dc19705e83284be383962f2
2018-07-26 13:40:13 -07:00

33 lines
1.2 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://dom.spec.whatwg.org/#interface-parentnode
*/
[NoInterfaceObject]
interface ParentNode {
[Constant]
readonly attribute HTMLCollection children;
[Pure]
readonly attribute Element? firstElementChild;
[Pure]
readonly attribute Element? lastElementChild;
[Pure]
readonly attribute unsigned long childElementCount;
[Func="IsChromeOrXBL"]
HTMLCollection getElementsByAttribute(DOMString name,
[TreatNullAs=EmptyString] DOMString value);
[Throws, Func="IsChromeOrXBL"]
HTMLCollection getElementsByAttributeNS(DOMString? namespaceURI, DOMString name,
[TreatNullAs=EmptyString] DOMString value);
[CEReactions, Throws, Unscopable]
void prepend((Node or DOMString)... nodes);
[CEReactions, Throws, Unscopable]
void append((Node or DOMString)... nodes);
};