Re: [whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Ian Hickson
On Wed, 14 Jan 2015, Janusz Majnert wrote:
 On 14.01.2015 14:01, Anne van Kesteren wrote:
  Andrea just landed the last patch for the BroadcastChannel API:
  
 https://bugzilla.mozilla.org/show_bug.cgi?id=966439
 
  https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts
  
  Assuming everything sticks it'll start appearing in Firefox Nightly
  soon. We thought we'd give everyone a heads up we're doing this since
  it hasn't been discussed much.
 
 From quickly skimming the linked spec it looks like the same 
 functionality (minus sending objects) is already available with the use 
 of WebStorage: 
 https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-event

If you look at the bug that introduced this feature, you'll see that 
avoiding abusing localStorage was in fact the original motivation for this 
API. :-)

   https://www.w3.org/Bugs/Public/show_bug.cgi?id=22628

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Janusz Majnert
Got it! Thanks

2015-01-14 20:07 GMT+01:00 Ian Hickson i...@hixie.ch:
 On Wed, 14 Jan 2015, Janusz Majnert wrote:
 On 14.01.2015 14:01, Anne van Kesteren wrote:
  Andrea just landed the last patch for the BroadcastChannel API:
 
 https://bugzilla.mozilla.org/show_bug.cgi?id=966439
 
  https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts
 
  Assuming everything sticks it'll start appearing in Firefox Nightly
  soon. We thought we'd give everyone a heads up we're doing this since
  it hasn't been discussed much.

 From quickly skimming the linked spec it looks like the same
 functionality (minus sending objects) is already available with the use
 of WebStorage:
 https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-event

 If you look at the bug that introduced this feature, you'll see that
 avoiding abusing localStorage was in fact the original motivation for this
 API. :-)

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22628

 --
 Ian Hickson   U+1047E)\._.,--,'``.fL
 http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
 Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Janusz Majnert

On 14.01.2015 14:01, Anne van Kesteren wrote:

Andrea just landed the last patch for the BroadcastChannel API:

   https://bugzilla.mozilla.org/show_bug.cgi?id=966439
   
https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts

Assuming everything sticks it'll start appearing in Firefox Nightly
soon. We thought we'd give everyone a heads up we're doing this since
it hasn't been discussed much.

From quickly skimming the linked spec it looks like the same 
functionality (minus sending objects) is already available with the use 
of WebStorage:

https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-event

Regards,
--
Janusz Majnert
Senior Software Engineer
Samsung RD Institute Poland
Samsung Electronics


Re: [whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Anne van Kesteren
On Wed, Jan 14, 2015 at 2:58 PM, Janusz Majnert j.majn...@samsung.com wrote:
 From quickly skimming the linked spec it looks like the same functionality
 (minus sending objects) is already available with the use of WebStorage:
 https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-event

That only handles strings and involves an API that is racy and best
avoided. You could see the BroadcastChannel API as a better designed
lower-level primitive.


-- 
https://annevankesteren.nl/


Re: [whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Rich Tibbett
On Wed, Jan 14, 2015 at 2:58 PM, Janusz Majnert j.majn...@samsung.com wrote:
 On 14.01.2015 14:01, Anne van Kesteren wrote:

 Andrea just landed the last patch for the BroadcastChannel API:

https://bugzilla.mozilla.org/show_bug.cgi?id=966439

 https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts

 Assuming everything sticks it'll start appearing in Firefox Nightly
 soon. We thought we'd give everyone a heads up we're doing this since
 it hasn't been discussed much.

 From quickly skimming the linked spec it looks like the same functionality
 (minus sending objects) is already available with the use of WebStorage:
 https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-event

It is possible but not trivial (see e.g.
http://blog.fastmail.com/2012/11/26/inter-tab-communication-using-local-storage/).
Paving such cowpaths is a good thing.


Re: [whatwg] Confusion about node1.replace(node2)

2015-01-14 Thread Glen Huang
Thank you for the quick fix.

 On Jan 14, 2015, at 5:37 PM, Anne van Kesteren ann...@annevk.nl wrote:
 
 On Mon, Jan 12, 2015 at 1:15 PM, Glen Huang curvedm...@gmail.com wrote:
 So yeah, replaceWith looks pretty good.
 
 Thanks: 
 https://github.com/whatwg/dom/commit/b7563aaf0864c8d104d18c36a9eda036c5205131
 
 
 -- 
 https://annevankesteren.nl/



Re: [whatwg] Confusion about node1.replace(node2)

2015-01-14 Thread Anne van Kesteren
On Mon, Jan 12, 2015 at 1:15 PM, Glen Huang curvedm...@gmail.com wrote:
 So yeah, replaceWith looks pretty good.

Thanks: 
https://github.com/whatwg/dom/commit/b7563aaf0864c8d104d18c36a9eda036c5205131


-- 
https://annevankesteren.nl/


[whatwg] BroadcastChannel in Firefox Nightly

2015-01-14 Thread Anne van Kesteren
Andrea just landed the last patch for the BroadcastChannel API:

  https://bugzilla.mozilla.org/show_bug.cgi?id=966439
  
https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts

Assuming everything sticks it'll start appearing in Firefox Nightly
soon. We thought we'd give everyone a heads up we're doing this since
it hasn't been discussed much.


-- 
https://annevankesteren.nl/