shindig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yao Zhang <yaozyzhang2...@gmail.com>
Subject Question of supporting creating a gadget inside an existing iframe on base document.
Date Thu, 12 Jan 2012 03:21:51 GMT
Hi all,

I met a problem when I tried to create a new gadget site by newGadgetSite
with the parameter gadgetEl set to a DOM node inside an existing iframe on
base document. The gadget can not be rendered.

I did some debugging and found that feature org.openajax.hub-2.0.5 and rpc
can not handle this case. Basically a random DOM id is created for the DOM
node and document.getElementById is used later to get this DOM node.
However, if this node is inside an iframe, you can only get the DOM node by
using its owner document's getElementById.

I tried to change the code in org.openajax.hub-2.0.5 and rpc to use
ownerDocument and it works well.

The question is that I do not have other good idea but change the rpc's
public interface rpc.setupReceiver to accept a new DOM node parameter
instead of current DOM id parameter. But this might break current code
calling rpc.setReceiver.

This new DOM node parameter can be added to the end of rpc.setupReceiver
parameter list which will not break current usage. But if someone need to
create gadget inside iframe, this new DOM node parameter is required.

Is this kind of change acceptable? Any suggestion and direction on how to
handle this better are appreciated.

Thanks!

Zhang Yao

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message