mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
Implement node.moveBefore() This implements the atomic move method for DOM nodes. This allows moving elements within the DOM without running the full remove and insertion steps, allowing more seamless behaviour such as CSS transitions continuing from where they are rather than restarting. Spec: https://dom.spec.whatwg.org/#dom-parentnode-movebefore Testing: Existing WPTs --------- Signed-off-by: Luke Warlow <lwarlow@igalia.com>
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
/* 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 https://mozilla.org/MPL/2.0/. */
|
|
/*
|
|
* The origin of this IDL file is
|
|
* https://dom.spec.whatwg.org/#interface-parentnode
|
|
*/
|
|
|
|
interface mixin ParentNode {
|
|
[SameObject]
|
|
readonly attribute HTMLCollection children;
|
|
[Pure]
|
|
readonly attribute Element? firstElementChild;
|
|
[Pure]
|
|
readonly attribute Element? lastElementChild;
|
|
[Pure]
|
|
readonly attribute unsigned long childElementCount;
|
|
|
|
[CEReactions, Throws, Unscopable]
|
|
undefined prepend((Node or DOMString)... nodes);
|
|
[CEReactions, Throws, Unscopable]
|
|
undefined append((Node or DOMString)... nodes);
|
|
[CEReactions, Throws, Unscopable]
|
|
undefined replaceChildren((Node or DOMString)... nodes);
|
|
|
|
[CEReactions, Throws]
|
|
undefined moveBefore(Node node, Node? child);
|
|
|
|
[Pure, Throws]
|
|
Element? querySelector(DOMString selectors);
|
|
[NewObject, Throws]
|
|
NodeList querySelectorAll(DOMString selectors);
|
|
};
|