tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Node.html (1715B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <title>Custom Elements: CEReactions on Node interface</title>
      5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
      6 <meta name="assert" content="nodeValue, textContent, normalize, cloneNode, insertBefore, appendChild, replaceChild, and removeChild of Node interface must have CEReactions">
      7 <meta name="help" content="https://dom.spec.whatwg.org/#node">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="../resources/custom-elements-helpers.js"></script>
     11 <script src="./resources/reactions.js"></script>
     12 </head>
     13 <body>
     14 <div id="log"></div>
     15 <script>
     16 
     17 testAttributeMutator(function (element, name, value) {
     18    element.getAttributeNode(name).nodeValue = value;
     19 }, 'nodeValue on Node');
     20 
     21 testAttributeMutator(function (element, name, value) {
     22    element.getAttributeNode(name).textContent = value;
     23 }, 'textContent on Node');
     24 
     25 // FIXME: Add a test for normalize()
     26 
     27 testCloner(function (customElement) {
     28    return customElement.cloneNode(false);
     29 }, 'cloneNode on Node');
     30 
     31 testNodeConnector(function (newContainer, customElement) {
     32    newContainer.insertBefore(customElement, newContainer.firstChild);
     33 }, 'insertBefore on ChildNode');
     34 
     35 testNodeConnector(function (newContainer, customElement) {
     36    newContainer.appendChild(customElement);
     37 }, 'appendChild on ChildNode');
     38 
     39 testNodeConnector(function (newContainer, customElement) {
     40    newContainer.replaceChild(customElement, newContainer.firstChild);
     41 }, 'replaceChild on ChildNode');
     42 
     43 testNodeDisconnector(function (customElement) {
     44    customElement.parentNode.removeChild(customElement);
     45 }, 'removeChild on ChildNode');
     46 
     47 </script>
     48 </body>
     49 </html>