[Webkit-unassigned] [Bug 148392] New: Page does not update when <link> media attribute changes to no longer apply to page
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 24 14:07:53 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=148392
Bug ID: 148392
Summary: Page does not update when <link> media attribute
changes to no longer apply to page
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: joepeck at webkit.org
CC: benjamin at webkit.org, simon.fraser at apple.com
* SUMMARY
Page does not update when <link> media attribute changes to no longer apply to page.
* TEST
<link id="link" rel="stylesheet" href="data:text/css,body{color:red}" media="print">
<p>Text To Change Color</p>
<button id="button">Then Click me</button>
<script>
document.getElementById("button").addEventListener("click", function() {
var link = document.getElementById("link");
var currentMedia = link.media;
var newMedia = currentMedia === "screen" ? "print" : "screen";
console.log(currentMedia + " => " + newMedia);
link.setAttribute("media", newMedia);
});
</script>
* STEPS TO REPRODUCE
1. Load test
2. Click the button (note the text changes from black => red)
3. Click the button again
=> text does not change from red => black, but it should
* NOTES
- Chrome and Firefox both behave as expected with this test case
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150824/015fb69f/attachment-0001.html>
More information about the webkit-unassigned
mailing list