before-after-dynamic-attr-001

generated content

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
dom

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html class="reftest-wait"><head>
 3     <link rel="reference" href="before-after-dynamic-attr-001-ref.xht">
 4     <title>CSS Test: generated content</title>
 5     <link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
 6     <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content">
 8     <meta name="flags" content="dom">
 9 <style type="text/css">
10 body {
11   font-family:sans-serif;
12 }
13 body:before {
14   content:attr(my-attr);
15 }
16 body:after {
17   content:attr(my-attr-2);
18 }
19 </style>
20 <script type="text/javascript">
21 function fixupDOM() {
22   document.body.setAttribute("my-attr", "before");
23   document.body.setAttribute("my-attr-2", "after!");
24   document.documentElement.className = "";
25 }
26 </script>
27 </head>
28 <body onload="fixupDOM()" my-attr-2="xyz">
29 
30 
31 </body></html>