Re: [whatwg] Proposal for separating script downloads and execution

2011-02-01 Thread Kyle Simpson
? The ability to separate download and execution is a trend that has not only emerged, but continues to be explored. There are problems with the previous solutions, the biggest of which (in the case of #1 and #2) is the reliance on the browser caching behavior which may, in some instances, lead

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-01 Thread Kyle Simpson
? The major issue I have with the way the spec is written is that there is no way to feature detect this capability. I'd like this behavior (which I agree, is useful), to be more explicit so we can easily make use where available. I agree, the spec doesn't make it clear in its current wording

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-03 Thread Kyle Simpson
? One reason I like the noexecute proposal more than relying on readyState is that noexecute can be used in markup. I.e. you can do things like: html head script src=a.js noexecute onload=... script src=b.js noexecute onload=... script src=c.js noexecute onload=... /head Doesn't link

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-03 Thread Kyle Simpson
? I'm not sure why you are narrowing the scope to script loaders? (I imagine you're referring to js-libraries which help with loading scripts faster?) Yes, script loaders like LABjs are the primary use-case that I'm concerned about in terms of giving the load-but-defer-execution behavior to.

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-03 Thread Kyle Simpson
? I don't think readyState as Kyle describes is an appropriate candidate mechanism because it's not an actual indicator that the functionality exists. The only thing you can really be sure of if readyState is uninitialized is that the script element supports readyState. The fact the only

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-08 Thread Kyle Simpson
? I think we should do the readyState thing and put a note in the spec saying that implementors should be polite to authors and not implement the readyState property until they also implement the behavior that setting .src on a not-in-tree node starts the HTTP fetch (in order to make the

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-08 Thread Kyle Simpson
? Is there a specific problem with letting Web Workers handle this use case? They should not interfere with the UI thread. I think the primary reason why Web Workers is not useful is that it's not widespread enough adoption yet to be useful to the script loader community.

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-08 Thread Kyle Simpson
? Isn't this just a quality of implementation issue? No, frankly it isn't. No matter how good the implementation of the JavaScript engine on mobile, the mobile device will always be much more limited in processing power than a desktop browser environment. There are those who think that the

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-08 Thread Kyle Simpson
Can you list some of them? Most of the ones I can think of are ultimately different forms of the same optimization. I would first refer you to the use-cases that Steve Souders has documented around his ControlJS library. His commentary on this topic is far more comprehensive than anything I

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-08 Thread Kyle Simpson
? If that's what you were responding to, then I think your response is simply incorrect. There's nothing whatsoever that requires that a web browser freeze up its UI while parsing a script. If it does so, it's a quality of implementation issue, pure and simple. You don't need to be more

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-09 Thread Kyle Simpson
? Mighty conjecture, chap. Multithreading is even possible on microcontrollers like the Atmel ATmega32 ? so why should a modern operating system running on reasonable hardware not be able to do it? In most mobile devices I've had the exposure to developing for, multi-threading is not

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-09 Thread Kyle Simpson
? Regardless, considering such things is way outside the scope of anything that's going to be useful for web developers in the near-term dealing with these use-cases. Yes, but so is the proposal here, no? No, I don't think so. A huge part of my point with the proposal is that it builds on

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-09 Thread Kyle Simpson
? You're also ignoring the fact that there are several other documented use-cases for execution-deferral that are not related to mobile (or multi-threading) at all. That maybe the 80% use-case for this proposal, but it's certainly not the only reason we want and need a feature like this. Could

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-10 Thread Kyle Simpson
For the purposes of this discussion, we are combining (but safely so, I believe) execution and parsing, and saying that we want to be able to defer the parse/execution phase of script loading. The reason it's necessary to draw the distinction (and point out that parsing is the costly bit) is to

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-10 Thread Kyle Simpson
Testing this shows that IE9 doesn't fire a progress event for the transition that is of interest for the use case. That is, when the script transitions to loaded, there's no event. Once the script has been evaluated, there is a (rather useless) progress event for the transition to complete. The

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-10 Thread Kyle Simpson
The proposal is an optimization of these crude hacks. Authors using such hacks are unlikely to stop using them because the optimization does not work on deployed clients. What will happen is that people using the proposed feature will intro- duce subtle bugs in their code (like calling

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-11 Thread Kyle Simpson
We've gone back and forth around implementation specifics, and now I'd like to get a general feeling on direction. It seems that enough people understand why a solution like this is important, both on the desktop and for mobile, so what are the next steps? Are there changes I can make to my

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-11 Thread Kyle Simpson
Once again, the problem with changing how src works is that there's no way to feature detect this change. It's completely opaque to developers and therefore not helpful in solving the problem. I still believe the feature-detect for my proposal is valid. It's obviously not ideal (often times

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-13 Thread Kyle Simpson
I've compiled a WHATWG Wiki page detailing both Nicholas' most recent (and simplified) proposal (v2.1), as well as mine: http://wiki.whatwg.org/wiki/Script_Execution_Order_Control In essence, the two are somewhat converging, though are still distinct in important ways. Nicholas's proposal now

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-13 Thread Kyle Simpson
This change wasn't mentioned here, and introduces a lot of problems. - script onerror is only dispatched for fetch errors, not syntax errors, which makes error detection harder. - If the called script throws an exception, the synchronous execute() model allows the exception to be raised by

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-14 Thread Kyle Simpson
You may be correct in that people may never want to set preload to false. You'll note that I put in my proposal that an alternate approach would be for preload to be set to true by default. Since your proposal also says that setting `preload` to `false` wouldn't do anything except not

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-15 Thread Kyle Simpson
Although I'm not aware of anyone wrapping a 250KB style-sheet in comments, the pre-loading interface could seemingly be applied to any number of elements. Nicholas' original e-mail referenced a blog post by Stoyan Stefanov which details a way to pre-fetch both scripts and stylesheets. It's

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-17 Thread Kyle Simpson
(so in IE preload would default to true while in FF it would default to false). Let's be clear. In Nicholas' proposal, while the `preload` property may default to true or false, the property (I think confusingly misnamed) controls a *behavior*, which is NOT binary true/false. The more

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-17 Thread Kyle Simpson
The problem with prefetching immediately on src set is that you have no idea when or whether the node will get inserted. So you have to keep the data alive... for how long? From a user's point of view, that's a memory leak pure and simple, if the node never gets inserted into the DOM.

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-17 Thread Kyle Simpson
I dunno if I'd call that a memory leak as much as I'd call it a higher memory utilization, or maybe potential memory waste. Most users will call continuously increasing memory (which is what you'd get if a page creates script elements, sets src, and then doesn't insert them, perhaps by

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-17 Thread Kyle Simpson
Do you have any example where hundreds of megabytes of JavaScript is being loaded onto pages? Even tens of megabytes seems quite extraordinary. Think 10,000 script elements all pointing to the same 25KB script. If you're forced to preload the script at src-set time, that's 25MB of data. And

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-22 Thread Kyle Simpson
1) If your script is no-cache, or max-age:0, does IE make a new request for it for everyscript element? For the most part this seems to be the case but there are two exceptions: a) Before a URL loads, if it's assigned to another script, only one request is made. OK, that would be a

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-22 Thread Kyle Simpson
1) If your script is no-cache, or max-age:0, does IE make a new request for it for everyscript element? For the most part this seems to be the case but there are two exceptions: a) Before a URL loads, if it's assigned to another script, only one request is made. OK, that would be a violation

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-22 Thread Kyle Simpson
But note that image loads very explicitly do NOT have HTTP semantics, last I checked. In Gecko they coalesce very aggressively in a cache that sits in front of the network layer, including coalescing across documents, etc. This cache applies to both in-progress loads and completely loads (it's

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-22 Thread Kyle Simpson
This can cause the wrong image to show temporarily, until replaced by the right one (which I consider a bug; I think the cache needs to be less aggressive). That approach is clearly not workable for scripts... ;) No, clearly not. I think we're finally in agreement on something. :) I think

Re: [whatwg] Proposal for separating script downloads and

2011-02-22 Thread Kyle Simpson
First of all, which two proposals are we talking about here? 1. Nicholas' proposal, which is currently to preload a script if its script element is marked with a `preload` attribute, before the setting of the `src` property. To execute the script, you add the script element to the DOM. To

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-23 Thread Kyle Simpson
I don't understand why the preloading specifically would imply different HTTP caching semantics than normal dynamic script loading? It doesn't have to. It's just that if preloading is easy to trigger by accident and authors don't notice when they accidentally preload lots of stuff then we may

Re: [whatwg] Proposal for separating script downloads and

2011-02-23 Thread Kyle Simpson
3. My (and Nicholas's previous) proposal: Script elements are fetched when inserted into the DOM[1]. An event is dispatched when the script has been fetched, eg. onfetch or onpreload[2]. A preload attribute is added; when true, the script will not be executed when the fetch completes; call

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-23 Thread Kyle Simpson
I'm curious if we could apply some limit to the number of scripts that will be simultaneously preloaded, at say 100 scripts for instance? I would be fine with that from an implementation standpoint; not sure about the author-facing aspect of it. As one of the concerned web-authors, I can't

Re: [whatwg] Proposal for separating script downloads and execution

2011-02-23 Thread Kyle Simpson
Again, I think the spirit we all share is to find the simplest proposal that gets the job done, and introducing a new .execute() concept raised more questions than it purported to solve. The last dozen or two messages were regarding your rabbit hole, which raised serious issues. Serious

Re: [whatwg] Proposal for separating script downloads and execution

2011-03-03 Thread Kyle Simpson
So, I'm just curious, what do the participants of this thread (and Ian, specifically) feel is the most productive next step? We have 3 or 4 proposals that have all garnered various support. We've had at least one browser-developer informing us on concerns with various aspects of each. I have,

Re: [whatwg] Proposal for separating script downloads and execution

2011-03-03 Thread Kyle Simpson
So, I'm just curious, what do the participants of this thread (and Ian, specifically) feel is the most productive next step? We have 3 or 4 proposals that have all garnered various support. We've had at least one browser-developer informing us on concerns with various aspects of each. As with

Re: [whatwg] Proposal for separating script downloads and execution

2011-03-04 Thread Kyle Simpson
Can someone double-check that onreadystatechange does not actually work for this in IE9 in standards mode? IE9 seems to no longer fire onreadystatechange when the script is not in the document. (onerror is, though, which I think is a spec violation.)

Re: [whatwg] Proposal for separating script downloads and execution

2011-05-30 Thread Kyle Simpson
[Apologies for being out of the loop on this thread thus far, as I was one of the main proponents of it earlier this year. I am now going to dive in and offer some feedback, both to Ian's comments as well as to others that have replied. I also apologize that this will be an exceedingly long

Re: [whatwg] Proposal for separating script downloads and execution

2011-05-30 Thread Kyle Simpson
Sorry for repetition, but we can already preload images and CSS and apply them to the page at an arbitrary point in time. Why wouldn't we want the same thing for JavaScript? I think the question is whether you want _more_ than that for JavaScript. For images, you can preload them and choose

Re: [whatwg] Proposal for separating script downloads and execution

2011-05-30 Thread Kyle Simpson
This isn't practical if the contents of the script are not under the author's direct control. For example, an author that wanted to use jquery would create a script tag with the src set to one of the popular jquery mirrors (to maximize the chance of the resource being cached), but then have no

Re: [whatwg] Proposal for separating script downloads and execution

2011-05-30 Thread Kyle Simpson
If browsers processed (parsed compiled) scripts in a background thread it would mitigate the problem, but not solve it. Suppose I have 100K of JS I need right now to generate the DOM for the initial page, and I have another 500K of JS that's only needed if the user clicks on FeatureX. Assuming

Re: [whatwg] Proposal for separating script downloads and execution

2011-05-30 Thread Kyle Simpson
I think there's a valid use case for downloading a script and not evaluating it immediately. I think we all agree on that. Boris- I wish that were true, at this point, but I'm not sure that it is. The tone I got from Ian's post (and even subsequent replies) was that he in fact does not see

Re: [whatwg] readystatechange for SCRIPT

2011-09-10 Thread Kyle Simpson
Since nobody seems to object, I'm going to revert r6543 and make onreadystatechange special. Since nobody seems to object? You had this thread active with this suggestion for less than a day, and that's long enough to conclude that noone objects? Man, am I sorry I was away from my email

Re: [whatwg] readystatechange for SCRIPT

2011-09-10 Thread Kyle Simpson
In regards to all the concern about double-firing of load detection logic, IE9 added both `onload` event firing to their existing script element's `onreadystatechange` firing. That's been around now for 6 months (not to mention the year long platform-preview stage where content was tested in

Re: [whatwg] readystatechange for SCRIPT

2011-09-10 Thread Kyle Simpson
So, can I clarify something? You have moved `onreadystatechange` and `readyState` off of the script element entirely, and onto the HTML element? No. They've been removed from elements (and windows) entirely. They remain on Document. So, if I understand correctly, you've simply said there

Re: [whatwg] Deferring javascript download and execution until after onload

2012-11-28 Thread Kyle Simpson
Ian, The cost of parsing the script can be done async, even off the main thread in theory, so it's a non-issue. You have asserted many times that parsing is off the main thread, therefore it doesn't matter. That makes the giant (and I think faulty) assumption that the device in question has

Re: [whatwg] Deferring javascript download and execution until after onload

2012-11-28 Thread Kyle Simpson
Ian, The only cost there could be is the cost of executing the script, and it's already trivial to offload that: just put all the code in a function, then call the function when you're ready. It's already possible now to design scripts such that they don't run until you call them, so you

Re: [whatwg] Loading and executing script as quickly as possible using multipart/mixed

2012-12-03 Thread Kyle Simpson
Adam- To load and execute a script as quickly as possible, the author would use the following markup: script async src=path/to/script.js/script The HTTP server would then break script.js into chunks that are safe to execute sequentially and provide each chunk as a separate MIME part in

Re: [whatwg] Loading and executing script as quickly as possible using multipart/mixed

2012-12-03 Thread Kyle Simpson
I like the spirit of this idea, but one concern I have is about the script load and readystate events. It seems that authors will want to know when each chunk has finished executing (in the same way they want to know that scripts themselves finish). Why? What would you do in such an

Re: [whatwg] Proposal: Loading and executing script as quickly as possible using multipart/mixed

2012-12-04 Thread Kyle Simpson
One suggestion is to added a state to the readyState mechanism like chunkReady, where the event fires and includes in its event object properties the numeric index, the //@sourceURL, the separator identifier, or otherwise some sort of identifier for which the author can tell which chunk

Re: [whatwg] Deferring javascript download and execution until after onload

2012-12-08 Thread Kyle Simpson
Further evidence that the current state of the web is not friendly with respect to how browsers default to treating script loading/parsing/executing. https://www.facebook.com/notes/facebook-engineering/under-the-hood-the-javascript-sdk-truly-asynchronous-loading/10151176218703920 The efforts

[whatwg] Proposing: autoscroll event

2013-05-13 Thread Kyle Simpson
Increasingly, sites are doing client-side rendering at page load time, which is breaking the (useful) functionality of being able to have a #hash on a URL that auto-scrolls the page to make some element visible after page-load. A perfect example of this problem is that most #hash URLs (as far

[whatwg] Proposing: some companions to `requestAnimationFrame(..)`

2013-05-13 Thread Kyle Simpson
I'm proposing a couple of companion APIs to the already standardized `requestAnimationFrame(..)` API. First: https://gist.github.com/getify/5130304 `requestEachAnimationFrame(..)` and `cancelEachAnimationFrame(..)` This is the analog to `setInterval(..)`, in that it runs the handler

Re: [whatwg] Proposing: autoscroll event

2013-05-14 Thread Kyle Simpson
when should autoscroll be called? only after a url with a hash is clicked in the same page? when following a link to a : url#specific_hash? both cases? I initially conceived it as only firing on initial page load for a URL#hash, so definitely that case. But I can also see how it might be

Re: [whatwg] Proposing: autoscroll event

2013-05-14 Thread Kyle Simpson
So, to that end, what about just adjusting the spec for the hashchange event to also fire when the page is initially loaded if the URL contains a fragment identifier (hash)? The other scenarios mentioned would already be covered by the hashchange event. I think there's one critical thing

Re: [whatwg] Proposing: autoscroll event

2013-05-14 Thread Kyle Simpson
There have been times this automatic behavior has been quite annoying because of accidential ID/hash overlap. Please explain how a document subresource can be “accidentally” referred to by a URL be “accidental”. I do not understand it. In my case, I ran across this once (not too long ago)

Re: [whatwg] Script preloading

2013-07-09 Thread Kyle Simpson
This is a long and complicated topic with lots of history. Please bear with the length of my reply. It seems that people want something that: - Lets them download scripts but not execute them until needed. - Lets them have multiple interdependent scripts and have the browser manage

Re: [whatwg] Script preloading

2013-07-09 Thread Kyle Simpson
But I'd settle for anything, no matter how complex, as long as it actually solves the many use cases. Your proposed option has potential, as long as the missing event part is addressed. It seems to me that from an IE-perspective, the only missing piece is the event itself. Well,

Re: [whatwg] Script preloading

2013-07-09 Thread Kyle Simpson
I have been wrestling pretty hard with script loading issues lately. I'd say that having the browser manage script interdependency is probably a bad and cumbersome way to solve these issues. What do you mean by having the browser manage script interdependency? As far as I am aware, this

Re: [whatwg] Script preloading

2013-07-10 Thread Kyle Simpson
The IE4-10 technique is invisible to pre-parsers, if we're chasing performance here it's not good enough. ... Also invisible to preloaders. I personally don't care about scripts being discoverable by pre-parsers. I have done testing and am not convinced that something appearing earlier (in

Re: [whatwg] Script preloading

2013-07-10 Thread Kyle Simpson
** Summary: 1. `preload` attribute on script tags in markup, `preload` property on script elements created by code. In either case, its presence tells the browser not to execute the script once it finishes loading. 2. `onpreload` event fired on any script

Re: [whatwg] Script preloading

2013-07-10 Thread Kyle Simpson
Which of your use-cases have not been met? So far I've seen only I want X, Y, Z but not what you need X, Y, Z to achieve that isn't covered by other simpler proposals or existing features. You know, I keep relying on the fact that the body of work on this topic for almost 3 years ought NOT

Re: [whatwg] Script preloading

2013-07-10 Thread Kyle Simpson
Pre-parsers can kick in before a page is actually opened, but script cannot be executed. Let me dig up some numbers on the benefits of this report back. But logically, [parse html]-[load script] is always going to be faster than [parse html]-[parse inline script]-[execute inline

Re: [whatwg] Script preloading

2013-07-11 Thread Kyle Simpson
How is this any different from the case today when script elements are fetched and run in the situation where one 404's? Right now, without any script loader, AFAICT, if A loads fine, B 404's or 500's, and C loads fine, both A and C will run, and usually C will have lots of cascading errors

Re: [whatwg] Script preloading

2013-07-11 Thread Kyle Simpson
I am interested to see how the above use-cases would be met in your counter proposal(s) to see if it would be simpler/faster. If LabJS is a requirement, it must be factored in as a unit of complexity and load-step. Please do this rather than declare anything to be insufficient without

Re: [whatwg] Script preloading

2013-07-12 Thread Kyle Simpson
Ok, and I'm saying they shouldn't be asking LABjs to handle it, they should be asking the devtools teams at browser vendors to give them ways to deal with it. You're not going to be able to pause execution for code, implement future breakpoints, or debug root causes for this sort of thing

Re: [whatwg] Script preloading

2013-07-12 Thread Kyle Simpson
(AT EYE-WATERING-LENGTH) I'm sorry I'm too verbose on the list for everyone's taste. Every time I'm brief and make assumptions, I get accusations like Jake's repeated ones that I'm just asserting without reason. FWIW, my exhaustion of this process is not about my eyes, but my fingers sure

Re: [whatwg] Script preloading

2013-07-12 Thread Kyle Simpson
(being as brief as I possibly can...) As per the existing outline, I don't see how it could have any sensitivity. So, just to clarify, `script dependencies=…` waiting on some other script tag is ONLY waiting on that script tag loading to have some sort of positive network result, whether

Re: [whatwg] Script preloading

2013-07-14 Thread Kyle Simpson
So maybe a concept of optional dependency would be useful? 1. not all dependencies are JS files, e.g. authors use plugins to load template files, JSON, images, etc. 2. not all dependencies are usefully satisfied immediately after their JS file is loaded, e.g. some libraries may need

Re: [whatwg] Script preloading

2013-07-18 Thread Kyle Simpson
About a week ago, I presented a set of code comparing the script dependencies=.. approach to the script preload approach, as far as creating generalized script loaders. There were a number of concerns presented in those code snippets, and the surrounding discussions. I asked for input on the

Re: [whatwg] Script preloading

2013-07-22 Thread Kyle Simpson
FWIW, I'd be much more in favor of Jonas' proposal, at this point, than the dependencies=.. proposal. The `noexecute/execute()` is conceptually pretty similar to the preload proposal I've been pushing. As far as I can tell from how Jonas describes it, it looks like it would fit most of the

Re: [whatwg] Script preloading

2013-07-22 Thread Kyle Simpson
Do you have a link to your preload proposal? My main `script preload` proposal (skip the first section of this LONG email, proposal starts at Summary: several paragraphs down): http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-July/039973.html Then proposal slightly amended here:

[whatwg] Proposal: HTTP Headers + sessionStorage stored session-ID

2013-10-30 Thread Kyle Simpson
I have put together a simple soft proposal for a pair of HTTP Request/Response headers that bridge to the browser's sessionStorage mechanism for session ID storage. It's basically to embrace the new SPA style architecture prevalent on the web, and the use of sessionStorage, instead of the

Re: [whatwg] Proposal: HTTP Headers + sessionStorage stored session-ID

2013-10-31 Thread Kyle Simpson
Why not just use cookies ? I feel they're sufficient to do what you need. Asked differently: in what way are cookies insufficient so that we need a new different API/feature? There are substantive differences between the behavior of session cookies vs. sessionStorage. Without re-arguing the

Re: [whatwg] Proposal: HTTP Headers + sessionStorage stored session-ID

2013-12-06 Thread Kyle Simpson
On Thu, 31 Oct 2013, Kyle Simpson wrote: Session cookies are preserved at the browser-level, which means they are kept around for the lifetime of the browser instance. sessionStorage, OTOH, is kept only for the lifetime of the tab. In many respects, this makes sessionStorage more

Re: [whatwg] Promise-vending loaded() ready() methods on various elements

2014-03-14 Thread Kyle Simpson
This, along with Ilya's proposed link rel=preload ( https://docs.google.com/a/google.com/document/d/1HeTVglnZHD_mGSaID1gUZPqLAa1lXWObV-Zkx6q_HF4/edit#heading=h.x6lyw2ttub69), and JavaScript modules ( https://github.com/dherman/web-modules/blob/master/module-tag/explainer.md) gives us

Re: [whatwg] Promise-vending loaded() ready() methods on various elements

2014-03-14 Thread Kyle Simpson
So, if that's how we think this would work, we need to understand how the `execScript(..)` logic is going to be treated. Is creating a script element dynamically and inserting it going to make sure that it either: a. executes sync b. executes async, but a.js will *definitely* execute

Re: [whatwg] Promise-vending loaded() ready() methods on various elements

2014-03-14 Thread Kyle Simpson
I'd also like to make the observation that putting link rel=preload.loaded() together with script.loaded(), and indeed needing a promise mechanism to wire it altogether, is a fair bit more complicated than the initial proposals for script preloading use-cases from the earlier threads over the

Re: [whatwg] Promise-vending loaded() ready() methods on various elements

2014-03-15 Thread Kyle Simpson
As I noted above, what we need to know (and I guess we need to know this from all browsers) if there's a *guarantee* of a-b-c execution order (even if all 3 are executing async) I don't believe there is such a guarantee, unless the spec spells it out explicitly. The `async=false` stuff

Re: [whatwg] Promise-vending loaded() ready() methods on various elements

2014-03-15 Thread Kyle Simpson
I'd say the first syntax is a bit verbose for what I was dreaming 4 years ago when I started asking for a simple script preloading mechanism, but it's just this side of acceptable. If we have to take the second approach, I say that's unacceptably more verbose/complex and falls short of my

Re: [whatwg] Preloading and deferred loading of scripts and other resources

2014-08-23 Thread Kyle Simpson
Surely our goal should be to make script loaders unnecessary. There's unquestionably a lot of folks on this thread for whom that is their main concern. I think it's a mistake to assume that because they mostly seem to be working as browser developers (which strongly influences their

[whatwg] Supporting feature tests of untestable features

2015-03-31 Thread Kyle Simpson
There are features being added to the DOM/web platform, or at least under consideration, that do not have reasonable feature tests obvious/practical in their design. I consider this a problem, because all features which authors (especially those of libraries, like me) rely on should be able to

Re: [whatwg] Supporting feature tests of untestable features

2015-04-08 Thread Kyle Simpson
A lot of the untestable bugs have been around for a really, really long time, and are probably never going away. In fact, as we all know, as soon as a bug is around long enough and in enough browsers and enough people are working around that bug, it becomes a permanent feature of the web. So