tor-browser

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

HTMLParamElement.html (1334B)


      1 <!DOCTYPE html>
      2 <title>Custom Elements: CEReactions on HTMLParamElement interface</title>
      3 <link rel="author" title="Intel" href="http://www.intel.com">
      4 <meta name="assert" content="name, value of HTMLParamElement
      5  interface must have CEReactions">
      6 <meta name="help" content="https://html.spec.whatwg.org/#the-param-element">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="../../resources/custom-elements-helpers.js"></script>
     10 <script src="../resources/reactions.js"></script>
     11 
     12 <body>
     13 <script>
     14 
     15 function getParentElement() {
     16  let element = document.createElement('object');
     17  element['type'] = 'image/png';
     18  element['data'] = '/images/blue.png';
     19  document.body.appendChild(element);
     20  return element;
     21 }
     22 
     23 function setAttributes(instance, attribute, value) {
     24  instance.setAttribute(attribute, value);
     25 }
     26 
     27 testReflectAttributeWithDependentAttributes(
     28  'name', 'name', 'image1',
     29  'image2', 'name on HTMLParamElement', 'param',
     30  getParentElement, instance => setAttributes(instance, 'value', 'blue'),
     31  HTMLParamElement
     32 );
     33 testReflectAttributeWithDependentAttributes(
     34  'value', 'value', 'blue1',
     35  'blue2', 'value on HTMLParamElement', 'param',
     36  getParentElement, instance => setAttributes(instance, 'name', 'image'),
     37  HTMLParamElement
     38 );
     39 
     40 </script>
     41 </body>