mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Add tests for using replaceData to change CSS
This commit is contained in:
parent
3a740142d9
commit
96ba56c2c8
3 changed files with 44 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
<!doctype html>
|
||||
<title>(Ref #1) CSS Test Reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@mozilla.com">
|
||||
<link rel="author" title="Cheng You Bai" href="mailto:cyb.ai.815@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-characterdata-replacedata">
|
||||
<style>.pass { color: green }</style>
|
||||
<div class="pass">Should be green</div>
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<title>(Test #1) CSS Test: Dynamic changes to the stylesheet contents using replaceData are reflected</title>
|
||||
<link rel="match" href="stylesheet-replacedata-dynamic-ref.html">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@mozilla.com">
|
||||
<link rel="author" title="Cheng You Bai" href="mailto:cyb.ai.815@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-characterdata-replacedata">
|
||||
<style>.fail { color: green }</style>
|
||||
<div class="pass">Should be green</div>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
document.querySelector('style').firstChild.replaceData(1, 4, "pass");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue