https://github.com/mozilla/gecko-dev
Raw File
Tip revision: 8e613b67e1b65dda763497e96863d2ed5dba81c7 authored by ffxbld on 03 March 2016, 21:58:52 UTC
Added FIREFOX_45_0esr_RELEASE FIREFOX_45_0esr_BUILD1 tag(s) for changeset a5060cc482c6. DONTBUILD CLOSED TREE a=release
Tip revision: 8e613b6
dynamic-attr-01.html
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
    <title>CSS 2.1 Test Suite: generated content</title>
    <link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org" />
    <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
    <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content"/>
    <meta name="flags" content="dom" />
<style>
body {
  font-family:sans-serif;
}
body::before {
  content:attr(my-attr);
}
body::after {
  content:attr(my-attr-2);
}
</style>
<script>
function fixupDOM() {
  document.body.setAttribute("my-attr", "before");
  document.body.setAttribute("my-attr-2", "after!");
  document.documentElement.className = "";
}
</script>
</head>
<body my-attr-2="xyz" onload="fixupDOM()">
</body>
</html>
back to top