Re: [whatwg] API to delay the document load event

2013-04-29 Thread James Graham
On 04/29/2013 05:26 AM, Robert O'Callahan wrote: On Mon, Apr 29, 2013 at 3:11 PM, Glenn Maynard gl...@zewt.org wrote: On Sun, Apr 28, 2013 at 9:11 PM, Robert O'Callahan rob...@ocallahan.orgwrote: It would be easy for us to add some Firefox-only or FirefoxOS-only API here, but that seems

Re: [whatwg] API to delay the document load event

2013-04-29 Thread James Graham
On 04/29/2013 11:42 AM, Robert O'Callahan wrote: On Mon, Apr 29, 2013 at 8:56 PM, James Graham jgra...@opera.com mailto:jgra...@opera.com wrote: On 04/29/2013 05:26 AM, Robert O'Callahan wrote: Also, this is a feature where it's trivial for applications to gracefully

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Robert O'Callahan
On Mon, Apr 29, 2013 at 10:50 PM, James Graham jgra...@opera.com wrote: I mean, let's say you delay the load event until after some data has loaded over a web socket. If you try to use that data from the load event handler it can fail in a racy way in UAs that don't support delaying the load

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Lee Kowalkowski
On 24 April 2013 12:51, Robert O'Callahan rob...@ocallahan.org wrote: Context: https://bugzilla.mozilla.org/show_bug.cgi?id=863499 Proposal: Give Web applications APIs to explicitly delay the document load event. In particular, add a method document.delayLoadEvent() that causes the document

Re: [whatwg] API to delay the document load event

2013-04-29 Thread David Bruant
Le 29/04/2013 01:08, Glenn Maynard a écrit : On Sun, Apr 28, 2013 at 5:39 PM, David Bruant bruan...@gmail.com mailto:bruan...@gmail.com wrote: Le 29/04/2013 00:14, Robert O'Callahan a écrit : We don't want to require people to do everything in Caja just to support

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Boris Zbarsky
On 4/29/13 6:50 AM, James Graham wrote: So far we have kept the model where the load event is auomatically managed by the UA, rather than giving the developer direct control of it. Developers already have direct control over the load event to the extent being proposed, as far as I can tell.

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Rick Waldron
On Mon, Apr 29, 2013 at 9:51 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 4/29/13 6:50 AM, James Graham wrote: So far we have kept the model where the load event is auomatically managed by the UA, rather than giving the developer direct control of it. Developers already have direct control

Re: [whatwg] API to delay the document load event

2013-04-29 Thread David Bruant
Le 29/04/2013 14:44, David Bruant a écrit : I'm no Caja expert, but this light-Caja might be as simple as picking a few Caja libraries and wiring them a bit differently. I'll ask the Caja mailing-list. Which I did and the answers are very interesting:

Re: [whatwg] API to delay the document load event

2013-04-29 Thread James Graham
On 04/29/2013 03:51 PM, Boris Zbarsky wrote: On 4/29/13 6:50 AM, James Graham wrote: So far we have kept the model where the load event is auomatically managed by the UA, rather than giving the developer direct control of it. Developers already have direct control over the load event to the

[whatwg] Proposal: API to ask the user for a file

2013-04-29 Thread JC
Hi, So far the only way to ask a user to select a file (e.g. to upload an attachment in a mail client) without showing the ugly file input UI is to create one of these elements, hide it somehow, and invoke the click method on it and listen for the changed event. This may or may not work

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Aaron Boodman
I think that there would be many uses for a mechanism that allows developers to take part in letting the UA known when it is ready. For example, we would use then when analyzing extension code server-side. Another example would be systems that take screenshots of web pages for use in browser start

[whatwg] Deferred Javascript parsing

2013-04-29 Thread Benjamin Stürmer
I have been reading about a technique described here ( http://googlecode.blogspot.de/2009/09/gmail-for-mobile-html5-series-reducing.html) for deferring the parsing of scripts until they are actually required. This can be a useful technique for allowing lazy-loading of script without AJAX. A common

Re: [whatwg] Proposal: API to ask the user for a file

2013-04-29 Thread Ian Hickson
On Mon, 29 Apr 2013, JC wrote: So far the only way to ask a user to select a file (e.g. to upload an attachment in a mail client) without showing the ugly file input UI is to create one of these elements, hide it somehow, and invoke the click method on it and listen for the changed event.

Re: [whatwg] Deferred Javascript parsing

2013-04-29 Thread David Bruant
Le 29/04/2013 22:21, Benjamin Stürmer a écrit : I have been reading about a technique described here ( http://googlecode.blogspot.de/2009/09/gmail-for-mobile-html5-series-reducing.html) for deferring the parsing of scripts until they are actually required. This can be a useful technique for

Re: [whatwg] Proposal: API to ask the user for a file

2013-04-29 Thread Jonas Sicking
On Mon, Apr 29, 2013 at 1:41 PM, Ian Hickson i...@hixie.ch wrote: On Mon, 29 Apr 2013, JC wrote: So far the only way to ask a user to select a file (e.g. to upload an attachment in a mail client) without showing the ugly file input UI is to create one of these elements, hide it somehow, and

Re: [whatwg] Deferred Javascript parsing

2013-04-29 Thread Garrett Smith
On 4/29/13, David Bruant bruan...@gmail.com wrote: Le 29/04/2013 22:21, Benjamin Stürmer a écrit : I have been reading about a technique described here ( http://googlecode.blogspot.de/2009/09/gmail-for-mobile-html5-series-reducing.html) for deferring the parsing of scripts until they are

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Glenn Maynard
On Sun, Apr 28, 2013 at 10:26 PM, Robert O'Callahan rob...@ocallahan.orgwrote: If it doesn't get used, why would they need to invest time implementing it? Putting a feature in the HTML spec (or related specs) is asking all browsers to implement it. If we don't expect anyone but Firefox to

Re: [whatwg] API to delay the document load event

2013-04-29 Thread Nils Dagsson Moskopp
James Graham jgra...@opera.com schrieb am Mon, 29 Apr 2013 12:50:34 +0200: […] I mean, let's say you delay the load event until after some data has loaded over a web socket. If you try to use that data from the load event handler it can fail in a racy way in UAs that don't support