https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 0b3aff1e3e53e44fc7644d56c2e77be24e75f9c1 authored by chrishtr@chromium.org on 09 July 2017, 05:13:10 UTC
Don't perform forced style or layout updates in Document::implicitClose
Tip revision: 0b3aff1
interfaces.html
<!doctype html>
<title>Selection interface tests</title>
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/WebIDLParser.js></script>
<script src=/resources/idlharness.js></script>
<script type=text/plain>
// http://w3c.github.io/selection-api/#selection-interface
interface Selection {
    readonly attribute Node?         anchorNode;
    readonly attribute unsigned long anchorOffset;
    readonly attribute Node?         focusNode;
    readonly attribute unsigned long focusOffset;
    readonly attribute boolean       isCollapsed;
    readonly attribute unsigned long rangeCount;
    readonly attribute DOMString     type;
    Range     getRangeAt(unsigned long index);
    void      addRange(Range range);
    void      removeRange(Range range);
    void      removeAllRanges();
    void      empty();
    void      collapse(Node? node, optional unsigned long offset = 0);
    void      setPosition(Node? node, optional unsigned long offset = 0);
    void      collapseToStart();
    void      collapseToEnd();
    void      extend(Node node, optional unsigned long offset = 0);
    void      setBaseAndExtent(Node anchorNode,
                               unsigned long anchorOffset,
                               Node focusNode,
                               unsigned long focusOffset);
    void      selectAllChildren(Node node);
    [CEReactions]
    void      deleteFromDocument();
    boolean   containsNode(Node node,
                           optional boolean allowPartialContainment = false);
    stringifier DOMString ();
};
</script>
<script>
"use strict";

var idlArray = new IdlArray();
idlArray.add_idls(document.querySelector("script[type=text\\/plain]").textContent);
idlArray.add_objects({Selection: ['getSelection()']});
idlArray.test();
</script>
back to top