MDN self-hosted library · e01.org
page_action / notebook

page_action

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

css
    #outside {
      fill: black;
    }
    #inside {
      fill: red;
    }
    @media (prefers-color-scheme: dark) {
      #outside {
        fill: white;
      }
      #inside {
        fill: black;
      }
    }
js
browser.pageAction.onClicked.addListener(handleClick);