authorizeConsumerMessage(event) {
    // Ignore Non-JSONRPC messages or messages not from the parent frame
    if (!event.data.jsonrpc || event.source !== window.parent) {
      return false;
    }

    logger.log('<< provider', event.origin, event.data);
    // For Chrome, the origin property is in the event.originalEvent object
    const origin = event.origin || event.originalEvent.origin;
    if (!this.activeACL && this.acls.includes(origin)) {
      this.activeACL = origin;
    }

    if (this.acls.includes('*') || this.acls.includes(origin) || this.acls.some((acl) => {
      // Strip leading wildcard to get domain and verify it matches the end of the event's origin.
      const domain = acl.replace(/^\*/, '');
      return origin.substring(origin.length - domain.length) === domain;
    })) {
      return true;
    }

    return false;
  }
/**
   * Verify an incoming message event's origin against the configured ACLs
   * @param {object} event - The emitted message event.
   */
Verify an incoming message event's origin against the configured ACLs
@param {object} event - The emitted message event.
Verify an incoming message event ' s origin against the configured ACLs @param { object } event - The emitted message event .
authorizeConsumerMessage(event) {
    if (!event.data.jsonrpc || event.source !== window.parent) {
      return false;
    }
    logger.log('<< provider', event.origin, event.data);
    const origin = event.origin || event.originalEvent.origin;
    if (!this.activeACL && this.acls.includes(origin)) {
      this.activeACL = origin;
    }
    if (this.acls.includes('*') || this.acls.includes(origin) || this.acls.some((acl) => {
      const domain = acl.replace(/^\*/, '');
      return origin.substring(origin.length - domain.length) === domain;
    })) {
      return true;
    }
    return false;
  }
authorizeConsumerMessage ( event ) { if ( ! event . data . jsonrpc || event . source !== window . parent ) { return false ; } logger . log ( '<< provider' , event . origin , event . data ) ; const origin = event . origin || event . originalEvent . origin ; if ( ! this . activeACL && this . acls . includes ( origin ) ) { this . activeACL = origin ; } if ( this . acls . includes ( '*' ) || this . acls . includes ( origin ) || this . acls . some ( ( acl ) => { const domain = acl . replace ( / ^\* / , '' ) ; return origin . substring ( origin . length - domain . length ) === domain ; } ) ) { return true ; } return false ; }
Verify an incoming message event's origin against the configured ACLs
 @param {object} event - The emitted message event.
Verify an incoming message event ' s origin against the configured ACLs @param { object } event - The emitted message event .
// Ignore Non-JSONRPC messages or messages not from the parent frame // For Chrome, the origin property is in the event.originalEvent object // Strip leading wildcard to get domain and verify it matches the end of the event's origin.