Closed marcelolorenzati closed 7 years ago
@marcelolorenzati this is exactly what we have planned through https://github.com/krakenjs/xcomponent/issues/54 :)
For now though, you could just pass a callback up to the parent with the functions you want to expose:
Parent:
MyComponent.render({
sendFunctionsToParent: function(obj) {
// Now my parent window has all of the functions from the child
obj.foo();
}
});
Child:
window.xprops.sendFunctionsToParent({
foo: function() { ... },
bar: function() { ... }
});
xcomponent defines child to parent but no parent to child messaging that would be of great value to have parent to iframes comunicated.