Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
 - This WPT test may be referenced by the following Test IDs:
            
- /css/css-pseudo/CSSPseudoElement-identity.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<title>CSS Pseudo Test: CSSPseudoElement stable identity</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="target"></div>
<script>
test(() => {
  let pseudo = target.pseudo("::before");
  assert_equals(pseudo.type, "::before");
  assert_equals(pseudo.parent, target);
  assert_equals(pseudo.element, target);
  assert_true(pseudo === target.pseudo("::before"));
});
</script>