[
https://issues.apache.org/jira/browse/WOOKIE-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143878#comment-13143878
]
Scott Wilson commented on WOOKIE-219:
-------------------------------------
The simplest approach is to use cross-document messaging.
In the widget:
var css = "h2{font-size: 24px;}";
parent.postMessage(css, '*")
In the container:
var wookie = "http://some.server.com:8080";
window.addEventListener('message',function(event) {
if(event.origin !==wookie) return;
var message = event.data;
// do something with message
},false);
However there is no real way of figuring out what kind of information has been
sent to the container from the widget as PostMessage can only send a String.
This could be JSON of course, in which case we perhaps need to have a standard
object structure we can use with some type information.
(Note that in practice, the container will need to message the widget first to
let it know its loaded and ready to receive messages, before the widget can
send a message to the container.)
Anyone have any other ideas for implementing this?
> Allow widgets to manage the container
> -------------------------------------
>
> Key: WOOKIE-219
> URL: https://issues.apache.org/jira/browse/WOOKIE-219
> Project: Wookie
> Issue Type: Improvement
> Reporter: Ross Gardler
> Priority: Minor
> Fix For: 0.9.2
>
>
> WOOKIE-218 contains a donation of an accessibility widget that can control
> display properties for people with sensory impairments. It works fine when
> run in the demo container, but Mark Johnson reports in that issue that it
> does not work when run in a real web page due to SOP restrictions.
> Mark suggests that the controller might want to provide a mechanism for
> manipulating the container, this could then be accessed through an optional
> feature provided by Wookie.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira