mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Allow loading multiple stylesheets for the same link element.
This commit is contained in:
parent
ca3cd64d6b
commit
3c3311b16a
7 changed files with 76 additions and 6 deletions
|
@ -0,0 +1,4 @@
|
|||
p {
|
||||
background-color: red;
|
||||
color: black;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
p {
|
||||
color: green;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
p {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<p>This text should be green on a white background
|
|
@ -0,0 +1,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
|
Loading…
Add table
Add a link
Reference in a new issue