These are chat archives for highfidelity/hifi

23rd
Apr 2017
Corey Evans
@whyroc
Apr 23 2017 13:23
Got another challenge, is there anyway to pass data back to the Tablet HTML pages from the .js code behind? I would like to do something as a basic example where if the avatar has collision event in-world, the HTML tablet page get an updated event bubbled up to it.. is it possible?
Seth Alves
@sethalves
Apr 23 2017 14:32
yeah you can go both directions, I think
let me look for an example
it's something like var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); tablet.emitScriptEvent(JSON.stringify({ ... }));
Seth Alves
@sethalves
Apr 23 2017 14:38
and in the html-side script, EventBridge.scriptEventReceived.connect(function (msg) { ... }
@whyroc
Corey Evans
@whyroc
Apr 23 2017 15:54
thanks @sethalves will take a good stare at that one