5 Matching Annotations
  1. Nov 2022
    1. ```html

      <style> ::selection { background: #00FF00; } ::highlight(foo) { background: #FF00FF; } </style> <script> getSelection().removeAllRanges(); getSelection().selectAllChildren(document.body); const style = getComputedStyle(document.body, "::highlight(foo)"); console.log(style.backgroundColor); </script> <body>Hello, world!</body>

      ```