Skip to content

widgetbot-io/embed-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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' })

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •