Add test case for `:watch-attr`

This commit is contained in:
Raymond Hill 2019-06-22 16:41:42 -04:00
parent b2fb650279
commit a436102ff7
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Procedural cosmetic filters</title>
<style>
.filters {
@ -25,7 +26,7 @@
justify-content: center;
}
.tile > div {
height: 100px;
height: 50px;
position: relative;
}
.tile > div > div {
@ -141,6 +142,20 @@
<code>#pcf #a14 .pass > a:has(b) + .fail:has(b)</code>
</div>
<div id="a15" class="tile">
<div class="pass"><div class="pass"><a><b class="ok"></b></a></div></div>
<code>#pcf #a15 .pass:watch-attrs(class) > .fail:has(b.notok)</code>
<script>
self.setTimeout(( ) =>
{
document.querySelector('#a15 .pass > .pass').className = 'fail';
document.querySelector('#a15 .pass > .fail b.ok').className = 'notok';
},
500
);
</script>
</div>
</div>
<script>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Procedural HTML filters</title>
<style>
.filters {
@ -25,7 +26,7 @@
justify-content: center;
}
.tile > div {
height: 100px;
height: 50px;
position: relative;
}
.tile > div > div {