code: function(details) {
          const tabId = details.tabId;
          if ( tabId > 0 && details.type === 'main_frame' ) {
              µBlock.tabContextManager.push(tabId, details.url);
          }
          this.fromTabId(tabId);
          this.realm = '';
          this.type = details.type;
          this.setURL(details.url);
          this.docId = details.type !== 'sub_frame'
              ? details.frameId
              : details.parentFrameId;
          if ( this.tabId > 0 ) {
              if ( this.docId === 0 ) {
                  this.docOrigin = this.tabOrigin;
                  this.docHostname = this.tabHostname;
                  this.docDomain = this.tabDomain;
              } else if ( details.documentUrl !== undefined ) {
                  this.setDocOriginFromURL(details.documentUrl);
              } else {
                  const pageStore = µBlock.pageStoreFromTabId(this.tabId);
                  const docStore = pageStore && pageStore.frames.get(this.docId);
                  if ( docStore ) {
                      this.docOrigin = undefined;
                      this.docHostname = docStore.pageHostname;
                      this.docDomain = docStore.pageDomain;
                  } else {
                      this.setDocOrigin(this.tabOrigin);
                  }
              }
          } else if ( details.documentUrl !== undefined ) {
              const origin = this.originFromURI(
                  µBlock.normalizePageURL(0, details.documentUrl)
              );
              this.setDocOrigin(origin).setTabOrigin(origin);
          } else if ( this.type === 'sub_frame' ) {
              const origin = this.originFromURI(this.url);
              this.setDocOrigin(origin).setTabOrigin(origin);
          } else {
              this.setDocOrigin(this.tabOrigin);
          }
          this.filter = undefined;
          return this;
      }
docs: https://github.com/uBlockOrigin/uBlock-issues/issues/459 In case of a request for frame and if ever no context is specified, assume the origin of the context is the same as the request itself.