How to use the @looker/chatty.ChattyHost.prototype 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 / tests / embed.spec.ts View on Github external
beforeEach(() => {
      LookerEmbedSDK.init('host.looker.com:9999', '/auth')

      fakeDashboardClient = {}
      builder = LookerEmbedSDK.createDashboardWithUrl(testUrl)
      builder.appendTo('#the-element')
      builder.on('dashboard:run:start', () => false)
      builder.withSandboxAttr('allow-scripts')
      builder.withClassName('classy')
      client = builder.build()
      spyOn(window, 'fetch')
      spyOn(ChattyHost.prototype, 'connect').and.callFake(async function (this: any) {
        iframe = this.iframe
        return Promise.resolve({})
      })
    })

@looker/chatty

A simple postMessage host / client channel manager.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis