tor-browser

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

img-src-in-synthetic-document.html (674B)


      1 <!DOCTYPE html>
      2 <link rel=author href="mailto:jarhar@chromium.org">
      3 <link rel=help href="https://github.com/whatwg/html/issues/9855">
      4 <link rel=help href="https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 
      8 <script>
      9 test(() => {
     10  const doc = document.implementation.createHTMLDocument('');
     11  const img = doc.createElement('img');
     12  img.setAttribute('src', '/test');
     13  doc.body.appendChild(img);
     14  assert_equals(img.src, '/test');
     15 }, 'HTMLImageElement.src should return the string from the attribute in about:blank documents.');
     16 </script>