showcase/host_dom_web library
Functions
-
listenToHost(
void onMessage(Object? data)) → VoidCallback -
Calls
onMessagewith the data of every message from the page that embeds the demo. Returns a function that stops listening. -
postToHost(
Map< String, Object?> message) → void -
Sends
messageto the page that embeds the demo. Only a page of the same origin receives it.