Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove styles when link node is removed from document
- Loading branch information
Showing
5 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
body { | ||
background-color: red; | ||
color: white !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Removing link tag should remove associated styles</title> | ||
<link rel="stylesheet" type="text/css" href="remove_link_styles.css"> | ||
<link rel="match" href="remove_link_styles_ref.html"> | ||
<body> | ||
<style> | ||
body { | ||
color: green; | ||
} | ||
</style> | ||
|
||
This text should be green and the background should not be red. | ||
|
||
<script> | ||
var l = document.querySelector('link[rel="stylesheet"]'); | ||
l.parentNode.removeChild(l); | ||
</script> | ||
</body> |
11 changes: 11 additions & 0 deletions
11
tests/wpt/mozilla/tests/mozilla/remove_link_styles_ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<body> | ||
<style> | ||
body { | ||
color: green; | ||
} | ||
</style> | ||
|
||
This text should be green and the background should not be red. | ||
</body> |