Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing style element's styles when elements is removed from dom
- Loading branch information
Showing
4 changed files
with
59 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,20 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Removing style element should remove all associated styles</title> | ||
<link rel="match" href="remove_style_styles_ref.html"> | ||
<body> | ||
<style> | ||
body { | ||
background-color: red; | ||
} | ||
</style> | ||
|
||
This text should be black and the background should not be red. | ||
|
||
<script> | ||
// Force restyling | ||
window.getComputedStyle(document.body); | ||
var s = document.querySelector('style'); | ||
s.parentNode.removeChild(s); | ||
</script> | ||
</body> |
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,5 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<body> | ||
This text should be black and the background should not be red. | ||
</body> |