git ssb

0+

regular / ssb-cms



Tree: 43af34efb145e2705ff168ae3e6f3cc6832314ac

Files: 43af34efb145e2705ff168ae3e6f3cc6832314ac / bus.js

386 bytesRaw
1let bus
2module.exports = bus = require('page-bus')('ssb-cms')
3module.exports.sendToParentFrame = (eventName, data) => {
4 if (window.frameElement) {
5 const payload = Object.assign({}, data, {
6 screenId: +window.frameElement.id
7 })
8 console.log(`sendToParentFrame: ${eventName}, ${JSON.stringify(payload)}`)
9 bus.emit(eventName, payload)
10 bus.emit('dummy', {})
11 }
12}
13

Built with git-ssb-web