阅读(1223) (2)

OpenDataContext.postMessage

2020-02-15 02:22:04 更新
在主域中调用

向开放数据域发送消息


参数

Object message

要发送的消息,message 中及嵌套对象中 key 的 value 只能是 primitive value


代码

const openCtx = tt.getOpenContext();
opnCtx.postMessage({
	company: 'bytedance'
})


Bug & Tips

  • 该方法只能在主域中使用
  • postMessage 中传递的信息的 value 只能是原生类型:number、string、boolean、null、undefined