DescriptionUnfortunately, this got more complicated than it should be. Three things happened here:
1) content-document-global-created notification replaced by document-element-inserted, the latter fires when the document is definitely initialized but still before any scripts run. As a result, the subject parameter is a document now, no longer a window - and it needs to be verified that we have a content window (as opposed to chrome windows which we should not touch).
2) Listening to DOMContentLoaded on pop-up documents to make sure that we "forget" them once that initial load happens. Any further loads should no longer be considered for pop-up blocking.
3) Since window.opener is still there even after the window loads, we cannot simply remove the window from _openers - the information will be recovered from window.opener when the user navigates to a different page. So we need to store a dummy value indicating "don`t touch" instead.
Repository: hg.adblockplus.org/adblockplus
Patch Set 1 #Patch Set 2 : Fixed wrong call for redirect blocking #
Total comments: 5
Patch Set 3 : Use Symbol for dummy value #MessagesTotal messages: 4
|