summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/stylesheet-change-href.html
blob: 6a3f18de98606f9b4d751100804688f3b98c5dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html>
<meta charset="utf-8">
<title>Obtaining a new stylesheet removes styles from the previous stylesheet.</title>
<link rel=match href=stylesheet-change-href-ref.html>
<script>
  function changeHref() {
    var elem = document.getElementById('stylesheet');
    elem.href = 'resources/good.css';
    elem.onload = null;
  }
</script>
<link id=stylesheet rel=stylesheet href="resources/bad.css" onload="changeHref()">
<p>This text should be green on a white background