Nimble Package Maestros

    @widgetbot/embed-api
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.3 • Public • Published

    embed-api

    import { Client } from '@widgetbot/embed-api'
    
    const api = new Client({ id: 'test', iframe: document.getElementsByTagName('iframe')[0] })
    
    api.on('message', message => {
      console.log('message:', message.id)
    })
    
    api.emit('sendMessage', 'hello world')
    import { Server } from '@widgetbot/embed-api'
    
    const api = new Server({ id: 'test' })
    
    api.on('sendMessage', message => {
      console.log('sending:', message)
    })
    
    api.emit('message', { id: 'testmessage' })

    Keywords

    none

    Install

    npm i @widgetbot/embed-api

    DownloadsWeekly Downloads

    939

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    11.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • victiondev
    • daave
    • advaithj