surrogate quick reference

Bug reports and enhancement requests
Locked
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

surrogate quick reference

Post by al_9x »

  • 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
References: 1, 2, 3, 4

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.
Last edited by al_9x on Thu Dec 01, 2011 9:07 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: surrogate quick reference

Post by Giorgio Maone »

Well done, thank you.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0
Locked