How to use the @looker/chatty.Chatty.createHost function in @looker/chatty

To help you get started, we’ve selected a few @looker/chatty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github looker-open-source / embed-sdk / src / embed.ts View on Github external
private async createIframe (url: string) {
    this._hostBuilder = Chatty.createHost(url)
    for (const eventType in this._builder.handlers) {
      for (const handler of this._builder.handlers[eventType]) {
        this._hostBuilder.on(eventType, handler)
      }
    }
    for (const attr of this._builder.sandboxAttrs) {
      this._hostBuilder.withSandboxAttribute(attr)
    }
    this._host = this._hostBuilder
      // tslint:disable-next-line:deprecation
      .frameBorder(this._builder.frameBorder)
      .withTargetOrigin(this.targetOrigin)
      .appendTo(this._builder.el)
      .build()

    // IE doesn't like calling classList.add() with no arguments, so check

@looker/chatty

A simple postMessage host / client channel manager.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis