summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-src-in-synthetic-document.html
blob: 24c5567fb854bf278033d9287035734e65996d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/whatwg/html/issues/9855">
<link rel=help href="https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
test(() => {
  const doc = document.implementation.createHTMLDocument('');
  const img = doc.createElement('img');
  img.setAttribute('src', '/test');
  doc.body.appendChild(img);
  assert_equals(img.src, '/test');
}, 'HTMLImageElement.src should return the string from the attribute in about:blank documents.');
</script>