Re: [whatwg] Declarative web worker creation and communication?

2012-11-05 Thread Andrew Wilson
On Mon, Nov 5, 2012 at 10:24 AM, Fred Andrews freda...@live.com wrote: Hi Simon, The use I have in mind is a work-in-progress, see: http://www.w3.org/community/pua/wiki/Draft#Examples However the HTML standard already permits a UA to disable JS, and there is the iframe sandbox, or CSP, or

Re: [whatwg] Declarative web worker creation and communication?

2012-11-05 Thread Andrew Wilson
On Tue, Nov 6, 2012 at 2:21 AM, Fred Andrews freda...@live.com wrote: Hi Andrew, Thank you for the feedback. The PUA 'shared context' will likely need to be a distinct web worker variant to cater for any required restrictions and also to ensure it does not entangle its specific

Re: [whatwg] suggestions for the Notifications API (http://notifications.spec.whatwg.org/)

2013-05-05 Thread Andrew Wilson
On Fri, May 3, 2013 at 6:49 PM, Nils Dagsson Moskopp n...@dieweltistgarnichtso.net wrote: alonn alonis...@gmail.com schrieb am Fri, 3 May 2013 18:50:36 +0300: 1. Having a way to check for the current permission without initiating a new Notification object first. something like webkit has

Re: [whatwg] Notifications: in workers

2013-05-14 Thread Andrew Wilson
Sorry, missed this the first time through: On Sun, Mar 31, 2013 at 4:40 PM, Anne van Kesteren ann...@annevk.nl wrote: There is some interest in exposing Notification objects in a worker so creating one does not require a postMessage() roundtrip. This seems problematic for shared workers as

Re: [whatwg] Notifications: in workers

2013-05-15 Thread Andrew Wilson
On Tue, May 14, 2013 at 9:19 PM, Anne van Kesteren ann...@annevk.nl wrote: On Tue, May 14, 2013 at 8:51 AM, Andrew Wilson atwil...@google.com wrote: On Sun, Mar 31, 2013 at 4:40 PM, Anne van Kesteren ann...@annevk.nl wrote: This seems problematic for shared workers as it is not clear which

Re: [whatwg] Notifications: in workers

2013-05-17 Thread Andrew Wilson
On Thu, May 16, 2013 at 5:45 PM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, May 15, 2013 at 8:24 AM, Andrew Wilson atwil...@google.com wrote: On Tue, May 14, 2013 at 9:19 PM, Anne van Kesteren ann...@annevk.nl wrote: Chrome currently does not seem to do any of this particularly well

Re: [whatwg] Notifications: usage feedback

2013-09-27 Thread Andrew Wilson
So, I'm not entirely sure how many lessons taken from the FirefoxOS implementation are applicable to the API for web pages in general, but I agree that what do we do if the user clicks on a notification after the parent page has been closed is a bit of an unsolved/unsolveable problem with the

Re: [whatwg] onclose events for MessagePort

2013-10-02 Thread Andrew Wilson
On Tue, Oct 1, 2013 at 7:01 PM, Olli Pettay olli.pet...@helsinki.fi wrote: I don't understand what the lifetime of MessagePorts to the lifetime of their owner document means in case of workers. And we sure want to delete MessagePort objects if nothing from JS side is keeping it, or the port

Re: [whatwg] onclose events for MessagePort

2013-10-10 Thread Andrew Wilson
On Thu, Oct 10, 2013 at 8:58 AM, Jonas Sicking jo...@sicking.cc wrote: I could see the GC case not being solvable. But is there a reason that we couldn't also fire the event if the other side is forcefully terminated through a navigation or a Worker.terminate() call? I still have the

Re: [whatwg] Possible bug in the way the spec about worker GC behavior

2013-10-10 Thread Andrew Wilson
Can you be more specific about what in the spec is incorrect? I guess you're saying that Gecko shuts down the worker as soon as the parent document is no longer active (when the worker transitions to suspendable), so the worker is generally shutdown before the document is discarded? I think that

Re: [whatwg] onclose events for MessagePort

2013-10-10 Thread Andrew Wilson
On Thu, Oct 10, 2013 at 5:20 PM, Ehsan Akhgari eh...@mozilla.com wrote: Why would they expect that? Storing a reference to a port object on a parent doesn't change the owner of the port. (I agree that this can be a bit confusing if authors are not familiar with MessagePorts, but this is

Re: [whatwg] Possible bug in the way the spec about worker GC behavior

2013-10-10 Thread Andrew Wilson
On Thu, Oct 10, 2013 at 5:06 PM, Ehsan Akhgari eh...@mozilla.com wrote: On Thu, Oct 10, 2013 at 7:58 AM, Andrew Wilson atwil...@google.comwrote: Can you be more specific about what in the spec is incorrect? I guess you're saying that Gecko shuts down the worker as soon as the parent document

Re: [whatwg] onclose events for MessagePort

2013-10-11 Thread Andrew Wilson
On Thu, Oct 10, 2013 at 11:52 PM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Oct 10, 2013 at 8:26 AM, Ehsan Akhgari eh...@mozilla.com wrote: On Thu, Oct 10, 2013 at 2:58 AM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Oct 9, 2013 at 3:06 PM, Ehsan Akhgari eh...@mozilla.com wrote:

Re: [whatwg] onclose events for MessagePort

2013-10-11 Thread Andrew Wilson
On Fri, Oct 11, 2013 at 10:18 AM, Anne van Kesteren ann...@annevk.nlwrote: On Fri, Oct 11, 2013 at 9:38 AM, Andrew Wilson atwil...@google.com wrote: *or while there exists an event listener on either port for the channeldropped event.* Once you do that you basically rely on the developer

Re: [whatwg] onclose events for MessagePort

2013-10-21 Thread Andrew Wilson
On Sat, Oct 19, 2013 at 2:26 AM, Jonas Sicking jo...@sicking.cc wrote: What I think might work is to say that as long as a channeldropped event listener is registered with a port, that is equivalent to holding a strong reference to the port. I.e. that prevents the channel from being GCed.

Re: [whatwg] The behaviour of Notification.requestPermission() in Workers

2013-10-24 Thread Andrew Wilson
Agreed with Anne - I don't see the value in exposing a non-functional requestPermission(). Certainly on Chrome (which only allows invoking requestPermission in the context of user input to prevent abuse) we would be unlikely to support requestPermission() from workers, at least unless we decide

[whatwg] Implementation question about Notifications

2013-11-14 Thread Andrew Wilson
The notification spec (http://notifications.spec.whatwg.org/#api) says that the Notification object has the following readonly attributes: title, dir, lang, body, tag, icon. Let's say I make the following calls: var n1 = new Notification(title); var n2 = new Notification(title, {icon:

Re: [whatwg] Implementation question about Notifications

2013-11-18 Thread Andrew Wilson
On Mon, Nov 18, 2013 at 1:01 PM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Nov 14, 2013 at 10:45 PM, Andrew Wilson atwil...@google.com wrote: var n1 = new Notification(title); var n2 = new Notification(title, {icon: invalid_icon_url}); var n3 = new Notification(title, {icon: http

Re: [whatwg] onclose events for MessagePort

2013-12-07 Thread Andrew Wilson
On Sat, Dec 7, 2013 at 2:22 AM, Ian Hickson i...@hixie.ch wrote: On Fri, 11 Oct 2013, Andrew Wilson wrote: Interesting. Section 5.3.1 of the MessagePort spec (BTW, I really recommend using the WHATWG HTML spec rather than the MessagePort spec, especially the version on the TR/ page

Re: [whatwg] [notifications][editorial] tweaking the Activating a notification window.focus() note

2014-04-23 Thread Andrew Wilson
The problem here is that the platform's notification design has no way to understand what the application wants to happen when the user clicks on a notification. As a great example - Gmail uses desktop notifications to notify the user about chat events and new emails. When the user clicks on a

Re: [whatwg] Notifications improvements

2014-07-10 Thread Andrew Wilson
On Thu, Jul 10, 2014 at 5:44 AM, Jonas Sicking jo...@sicking.cc wrote: Hi All, We've on and off discussed various features added to notifications. It'd be great to move forward with some of these improvements. I think the most low hanging fruit would be to add the following as data that

Re: [whatwg] Notifications improvements

2014-07-11 Thread Andrew Wilson
On Fri, Jul 11, 2014 at 2:30 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 10, 2014 at 1:04 AM, Andrew Wilson atwil...@google.com wrote: On Thu, Jul 10, 2014 at 5:44 AM, Jonas Sicking jo...@sicking.cc wrote: Hi All, We've on and off discussed various features added

Re: [whatwg] Notifications improvements

2014-08-06 Thread Andrew Wilson
On Tue, Aug 5, 2014 at 11:44 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jul 11, 2014 at 12:57 AM, Andrew Wilson atwil...@google.com wrote: On Fri, Jul 11, 2014 at 2:30 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Jul 10, 2014 at 1:04 AM, Andrew Wilson atwil...@google.com wrote

Re: [whatwg] Notifications improvements

2014-08-06 Thread Andrew Wilson
On Wed, Aug 6, 2014 at 12:48 PM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, Aug 6, 2014 at 10:08 AM, Andrew Wilson atwil...@google.com wrote: I understand your concern that is driving this proposal: you don't want to provide rich APIs that can't be well implemented on every platform

Re: [whatwg] Notifications improvements

2014-08-11 Thread Andrew Wilson
On Fri, Aug 8, 2014 at 2:48 PM, Peter Beverloo bever...@google.com wrote: Hi Andrew, On Wed, Aug 6, 2014 at 12:59 PM, Andrew Wilson atwil...@google.com wrote: On Wed, Aug 6, 2014 at 12:48 PM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, Aug 6, 2014 at 10:08 AM, Andrew Wilson atwil

Re: [whatwg] Notifications and service workers

2014-09-29 Thread Andrew Wilson
Apologies if I miss some subtleties in the preceding discussion - I've scanned the thread, but I haven't been following closely. On Fri, Sep 26, 2014 at 4:36 PM, Peter Beverloo bever...@google.com wrote: Let me reply to a few points mentioned in this thread -- it's quite overloaded :-). I've

Re: [whatwg] Notifications and service workers

2014-09-29 Thread Andrew Wilson
on them. On Mon, Sep 29, 2014 at 11:54 AM, Robert Bîndar robertbin...@gmail.com wrote: Sounds exactly like an use case of the 'data' attribute. 2014-09-29 12:23 GMT+03:00 Jonas Sicking jo...@sicking.cc: On Sun, Sep 28, 2014 at 11:15 PM, Andrew Wilson atwil...@google.com wrote: * Dropping

Re: [whatwg] Notifications and service workers

2014-09-29 Thread Andrew Wilson
- I'm saying that's not sufficient for many uses. -atw On Mon, Sep 29, 2014 at 12:34 PM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 29, 2014 at 3:10 AM, Andrew Wilson atwil...@google.com wrote: That only works if 'data' is a structured-cloneable data structure. Per spec it is yes

Re: [whatwg] Notifications and service workers

2014-09-29 Thread Andrew Wilson
seen this notification. This functionality may be somewhat broken on platforms that auto-close notifications though. On Mon, Sep 29, 2014 at 2:15 PM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 29, 2014 at 4:55 AM, Andrew Wilson atwil...@google.com wrote: On Mon, Sep 29, 2014 at 1:40 PM

Re: [whatwg] Notifications and service workers

2014-09-30 Thread Andrew Wilson
On Mon, Sep 29, 2014 at 9:14 PM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 29, 2014 at 6:09 AM, Andrew Wilson atwil...@google.com wrote: OK, looked back into the Gmail code (since it'd been a couple of years since I was really down in that notification code). There are two places

Re: [whatwg] Notifications and service workers

2014-09-30 Thread Andrew Wilson
On Tue, Sep 30, 2014 at 10:15 AM, Jonas Sicking jo...@sicking.cc wrote: On Sep 30, 2014 12:48 AM, Andrew Wilson atwil...@google.com wrote: On Mon, Sep 29, 2014 at 9:14 PM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Sep 29, 2014 at 6:09 AM, Andrew Wilson atwil...@google.com wrote

Re: [whatwg] Notifications and service workers

2014-10-06 Thread Andrew Wilson
On Sat, Oct 4, 2014 at 4:42 AM, Jonas Sicking jo...@sicking.cc wrote: Another thing we could do here is to simply not address this use case. Does gmail for android do the same thing? I wasn't able to reproduce it though I might have done something wrong. AFAICT, no - gmail for android doesn't

Re: [whatwg] Notifications and service workers

2014-10-06 Thread Andrew Wilson
On Mon, Oct 6, 2014 at 9:15 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Oct 6, 2014 at 12:05 AM, Andrew Wilson atwil...@google.com wrote: On Sat, Oct 4, 2014 at 4:42 AM, Jonas Sicking jo...@sicking.cc wrote: Another thing we could do here is to simply not address this use case