W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [widgets] Implementing the Storage Event for widget preferences

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Fri, 15 Jul 2011 17:23:53 +0200
Message-ID: <4E205B89.9040902@gmail.com>
To: Scott Wilson <scott.bradley.wilson@gmail.com>
CC: public-webapps@w3.org
On 7/13/11 7:46 PM, Scott Wilson wrote:
>
> On 13 Jul 2011, at 16:41, Marcos Caceres wrote:
>
>> On 7/13/11 5:08 PM, Scott Wilson wrote:
>>> Hi,
>>>
>>> In my attempt to get our conformance level from 97% to 100%, I've been
>>> trying to implement the Storage Event requirement for widget.preferences
>>> in the Widget API spec [1]. I'm using the following JS code injected
>>> into the widget page to raise the event:
>>>
>>> [89] var evt = document.createEvent('StorageEvent');
>>> [90]
>>> evt.initStorageEvent('storage',false,false,key,old_value,new_value,window.location,widget.preferences);
>>> [91] window.dispatchEvent(evt);
>>>
>>> However, in Safari I get "Test did not run or storage event was never
>>> fired."
>>>
>>> In Firefox 3.6, I get "Test setItem-fires-event failed by throwing the
>>> following exception: [Exception... "Operation is not supported" code:
>>> "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location:
>>> "http://localhost:8080/wookie/shared/js/wookie-wrapper.js Line: 89"]"
>>>
>>> In Opera 11.50, I get "Test setItem-fires-event failed by throwing the
>>> following exception: Error: WRONG_ARGUMENTS_ERR"
>>>
>>> Any pointers?
>>
>> What is widget.preferences implementing?
>
> Well, it "implements" the Widget preferences spec - but I guess in typeof terms its an Object.

That's probably what is screwing it :(
Received on Friday, 15 July 2011 15:24:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT