[whatwg] More effective model for handling resources

2014-03-12 Thread Tingan Ho
Hi, Almost all web developer I know use externally linked CSS resource in their web projects. That means that the browser needs to (1) request the html page (2) parse the html (3) request for the CSS resource that is linked from the html document. The problem with externally linked resources is po

Re: [whatwg] Canvas and Paths

2014-03-12 Thread Rik Cabanier
> > >> I don't think the arguments for removing these are compelling. The >> problems with the APIs have been addressed (e.g. there's no ambiguity in >> the case of overlapping text), the use cases are clear (e.g. drawing text >> around an arc or drawing a label along a line graph's line), and the

Re: [whatwg] Canvas and Paths

2014-03-12 Thread Rik Cabanier
> > > > You can do unions and so forth with just paths, no need for regions. > > > > How would you do a union with paths? > > If you mean that you can just aggregate the segments, sure but that > doesn't > > seem very useful. > > You say, here are some paths, here are some fill rules, here are some

Re: [whatwg] Canvas and Paths

2014-03-12 Thread Rik Cabanier
On Wed, Mar 12, 2014 at 3:44 PM, Ian Hickson wrote: > > On Thu, 28 Nov 2013, Rik Cabanier wrote: > > On Thu, Nov 28, 2013 at 8:30 AM, Jürg Lehni > > wrote: > > > > > > I meant to say that it I think it would make more sense if the path > > > was in the current transformation matrix, so it would

[whatwg] Canvas and Paths

2014-03-12 Thread Ian Hickson
On Thu, 28 Nov 2013, Rik Cabanier wrote: > On Thu, Nov 28, 2013 at 8:30 AM, Jürg Lehni > wrote: > > > > I meant to say that it I think it would make more sense if the path > > was in the current transformation matrix, so it would represent the > > same coordinate values in which it was drawn,

Re: [whatwg] canvas context "alpha" attribute

2014-03-12 Thread Ian Hickson
On Wed, 12 Mar 2014, Rik Cabanier wrote: > > > > It's being tracked here: > > > >https://www.w3.org/Bugs/Public/show_bug.cgi?id=23515 > > > > It's awaiting interest from a second vendor. It's not clear to me from > > the Mozilla bug whether Mozilla engineers actually support this. > > See roc

Re: [whatwg] canvas context "alpha" attribute

2014-03-12 Thread Rik Cabanier
On Wed, Mar 12, 2014 at 10:49 AM, Ian Hickson wrote: > On Wed, 12 Mar 2014, Rik Cabanier wrote: > > > > About a year ago, Google and mozilla proposed the "alpha" attribute as an > > option when you create the canvas context. The wiki explains the feature > > very well. [1] > > Since then, Google

Re: [whatwg] canvas context "alpha" attribute

2014-03-12 Thread Rik Cabanier
On Wed, Mar 12, 2014 at 10:49 AM, Ian Hickson wrote: > On Wed, 12 Mar 2014, Rik Cabanier wrote: > > > > About a year ago, Google and mozilla proposed the "alpha" attribute as an > > option when you create the canvas context. The wiki explains the feature > > very well. [1] > > Since then, Google

Re: [whatwg] canvas context "alpha" attribute

2014-03-12 Thread Ian Hickson
On Wed, 12 Mar 2014, Rik Cabanier wrote: > > About a year ago, Google and mozilla proposed the "alpha" attribute as an > option when you create the canvas context. The wiki explains the feature > very well. [1] > Since then, Google has implemented and shipped this [2][3]. There is a > proposal to i

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

2014-03-12 Thread Jake Archibald
On 12 March 2014 14:17, Domenic Denicola wrote: > > var img = document.createElement("img"); > var promise1 = img.loaded(); > img.src =" foo.png"; > var promise2 = img.loaded(); > > // (1) will promise1 be immediately fulfilled, since img has "about:blank" > or similar loaded already? > // (2) or w

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

2014-03-12 Thread Boris Zbarsky
On 3/12/14 10:17 AM, Domenic Denicola wrote: With promises you should only ask for the "loaded" promise *after* setting `src` Ah, fair. I'd been hoping we could get away without having to very carefully order the code, but I'm just not seeing a way to do that. Except, I suppose, for the ba

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

2014-03-12 Thread Domenic Denicola
From: whatwg-boun...@lists.whatwg.org [mailto:whatwg-boun...@lists.whatwg.org] On Behalf Of Boris Zbarsky > // img is already loaded sometimes > // Would like to observe a new load > var promise1 = img.loaded(); // oops! This will be pre-resolved if >// we we

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

2014-03-12 Thread Boris Zbarsky
On 3/12/14 9:32 AM, Jake Archibald wrote: You're right, I was short on detail for that case. img.src = foo; var promise1 = img.loaded(); img.src = bar; I expect promise1 to reject with an AbortError. No, the case I'm worried about is when the first load has already finished, you call loaded(

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

2014-03-12 Thread Jake Archibald
On 12 March 2014 13:15, Boris Zbarsky wrote: > On 3/12/14 7:23 AM, Jake Archibald wrote: > >> == img/link/script/document/iframe .loaded() == >> >> If the element hasn't loaded or is loading, vend a promise that >> resolves/rejects on its load/error event. >> If the element has fired load/error a

Re: [whatwg] Making URLSearchParams set() `value` argument optional

2014-03-12 Thread Domenic Denicola
undefined is probably more appropriate than null, but generally this would be nice. We have several URLs in our app at work that are built without = signs; it would be surprising if we couldn't round trip them through the URL parser without losing that. > On Mar 12, 2014, at 7:00, "Simon Sapin"

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

2014-03-12 Thread Boris Zbarsky
On 3/12/14 7:23 AM, Jake Archibald wrote: == img/link/script/document/iframe .loaded() == If the element hasn't loaded or is loading, vend a promise that resolves/rejects on its load/error event. If the element has fired load/error and isn't loading due to a source change, vend a resolved/reject

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

2014-03-12 Thread Jake Archibald
One of the problems with async scripting is doing something when/if it's ready. A complete solution looks like this https://gist.github.com/jakearchibald/7662e012462c7537a075, it would be a lot easier if we could just do: thing.loaded().then(function() { console.log('loaded'); }, function() {

Re: [whatwg] Making URLSearchParams set() `value` argument optional

2014-03-12 Thread Simon Sapin
On 12/03/2014 10:04, David Håsäther wrote: I would like to propose making the `value` argument optional for URLSearchParams set()[1]. This would work as set("name", ""), but would not output the equals sign, leading to nicer URLs. So: set("name", "") -> "?name=" set("name") -> "?name" Anne van

[whatwg] Making URLSearchParams set() `value` argument optional

2014-03-12 Thread David Håsäther
I would like to propose making the `value` argument optional for URLSearchParams set()[1]. This would work as set("name", ""), but would not output the equals sign, leading to nicer URLs. So: set("name", "") -> "?name=" set("name") -> "?name" Anne van Kesteren pointed out[2] that this is differe

Re: [whatwg] hit regions: clearing of regions

2014-03-12 Thread Dirk Schulze
On Mar 12, 2014, at 12:13 AM, Rik Cabanier wrote: > On Tue, Mar 11, 2014 at 10:03 AM, Edward O'Connor wrote: > >> Hi Rik, >> >> You wrote: >> >>> Currently, the specification states that if you create a region and >>> then create another region that completely covers region, the first >>> reg

[whatwg] canvas context "alpha" attribute

2014-03-12 Thread Rik Cabanier
About a year ago, Google and mozilla proposed the "alpha" attribute as an option when you create the canvas context. The wiki explains the feature very well. [1] Since then, Google has implemented and shipped this [2][3]. There is a proposal to implement [4] and a patch [5] for firefox. An author