- no prefix - blocked script surrogate
- matches blocked scripts
- runs only if page is script allowed
- runs when the blocked matched script would have
- '<' - before script surrogate
- matches allowed scripts
- runs only if page and script are allowed
- runs just before the matched script executes
- '>' - after script surrogate.
- matches allowed scripts
- runs only if page and script are allowed
- runs just after (load event) the matched script executes
- '@' - script allowed page (html document) surrogate
- matches script allowed pages
- runs only if the page is script allowed
- runs before HTML parsing starts
- '!' - script blocked page surrogate
- matches script blocked pages
- runs only if the page is script blocked
- runs on DOMContentLoaded
- '!@' - page surrogate
- matches pages
- runs on both script allowed and script blocked pages
- runs on DOMContentLoaded
Additional notes:
- Surrogates are never executed in global lexical scope, some are wrapped in functions, others in blocks, so variables declared with "let" are always private to the surrogate.