[widgets] the widget interface and child frames

Hi everyone,

I was just trying to wrap up conformance to the Widget API[1] storage events in Apache Wookie and came across a bit of an odd one.

In the test case "testclear-fires-event" [2] the test is managed from a child iFrame. This iFrame is accessing the widget object to do some checks after a storage event is received from the parent (main) frame.

This fails in Wookie for the simple reason that only the parent iFrame is considered to be "the widget" and we don't make the object available in child frames. The spec does seem to indicate we should though:

For a widget instance, a user agent must expose a unique object that implements the widget interface to author scripts that are same origin as the instance of the widget (e.g., a Document loaded in a [HTML] iframe element with content from within a widget package). User agent implementing[HTML]'s Window interface must implement the Widget interface as the widget attribute of the window object in the manner defined by theWindowWidget interface.

So am I right that we need to make the widget object available in all the child iFrames and Frames of the Widget's start file? Is it *really* necessary? Can't the (i)frame just do "parent.widget"?

S

[1] http://www.w3.org/TR/widgets-apis/

[2] http://dev.w3.org/2006/waf/widgets-api/test-suite/test-cases/ta-storage-event/clear-fires-event

Received on Friday, 27 January 2012 21:24:04 UTC