diff --git a/src/js/background.js b/src/js/background.js index edeac0893..4cd10eeff 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -346,7 +346,7 @@ const µBlock = { // jshint ignore:line this.setDocOrigin(origin).setTabOrigin(origin); return this; } - const origin = (this.itype & this.FRAME_ANY) !== 0 + const origin = this.isDocument() ? originFromURI(this.url) : this.tabOrigin; this.setDocOrigin(origin).setTabOrigin(origin); diff --git a/src/js/filtering-context.js b/src/js/filtering-context.js index 664205071..3da9d158f 100644 --- a/src/js/filtering-context.js +++ b/src/js/filtering-context.js @@ -56,7 +56,7 @@ export const XMLHTTPREQUEST = 1 << 13; export const INLINE_FONT = 1 << 14; export const INLINE_SCRIPT = 1 << 15; export const OTHER = 1 << 16; -export const FRAME_ANY = MAIN_FRAME | SUB_FRAME; +export const FRAME_ANY = MAIN_FRAME | SUB_FRAME | OBJECT; export const FONT_ANY = FONT | INLINE_FONT; export const INLINE_ANY = INLINE_FONT | INLINE_SCRIPT; export const PING_ANY = BEACON | CSP_REPORT | PING;