Re: The key custom elements question: custom constructors?

2015-07-17 Thread Anne van Kesteren
On Thu, Jul 16, 2015 at 10:36 PM, Domenic Denicola wrote: > I have a related question: what happens if the constructor throws? Right, this is the kind of thing we need to figure out. > > > "use strict"; > > window.throwingMode = true; > > class XFoo extends HTMLElement { > constructor() {

Re: Informal Service Worker working session

2015-07-17 Thread Alex Russell
Thanks everyone! Started a draft agenda page here; please pile in! https://github.com/slightlyoff/ServiceWorker/wiki/july_20_2015_meeting_agenda On Wed, Jul 15, 2015 at 10:38 PM, Benjamin Kelly wrote: > On Sat, Jul 4, 2015 at 7:26 AM, Alex Russell > wrote: > >> As many SW participants are goin

[Bug 27162] Browser differences in graphical layout of fullscreen mode.

2015-07-17 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27162 Anne changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug 28614] Weaken the requirement of the time of running async steps

2015-07-17 Thread bugzilla
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28614 Anne changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

RE: The key custom elements question: custom constructors?

2015-07-17 Thread Domenic Denicola
From: Anne van Kesteren [mailto:ann...@annevk.nl] >> // What about >> document.body.innerHTML = "[512 KiB of normal HTML] "; >> // ? does the HTML make it in, or does the operation fail atomically, or >> something else? > > It fails atomically, based on the definition of innerHTML. What if tha

Re: The key custom elements question: custom constructors?

2015-07-17 Thread Anne van Kesteren
On Fri, Jul 17, 2015 at 4:15 PM, Domenic Denicola wrote: > From: Anne van Kesteren [mailto:ann...@annevk.nl] >> It fails atomically, based on the definition of innerHTML. > > What if that 512 KiB of HTML contains ? Following > definitions, I assume we fire off the network request? If I look at "

Re: The key custom elements question: custom constructors?

2015-07-17 Thread Boris Zbarsky
On 7/17/15 10:38 AM, Anne van Kesteren wrote: If I look at "update the image data" step 6 it seems it might be fetched at a later point? Yes, but in practice the fetch will go ahead, no? There's nothing to prevent it from happening, so it's going to happen once you reach a stable state...

Re: The key custom elements question: custom constructors?

2015-07-17 Thread Anne van Kesteren
On Fri, Jul 17, 2015 at 5:47 PM, Boris Zbarsky wrote: > On 7/17/15 10:38 AM, Anne van Kesteren wrote: >> If I look at "update the image data" step 6 it seems it might be >> fetched at a later point? > > Yes, but in practice the fetch will go ahead, no? There's nothing to > prevent it from happeni

Re: The key custom elements question: custom constructors?

2015-07-17 Thread Boris Zbarsky
On 7/17/15 12:05 PM, Anne van Kesteren wrote: True, but either way this doesn't seem like a problem. You can create a DocumentFragment, insert a new , and then let it be GC'd, today. Sure. In practice it won't get GC'd until the load completes, which is sucky, but that's life. -Boris

alternate view on constructors for custom elements

2015-07-17 Thread Travis Leithead
OK, after reading Dominic's proposal [1], I'm a little confused. I thought that I understood how constructors should work, but there's some magic going on that I can't follow... I'm sure you folks can help. ``` class CustomElement extends HTMLElement { constructor() { super(); } } S

RE: alternate view on constructors for custom elements

2015-07-17 Thread Domenic Denicola
From: Travis Leithead [mailto:travis.leith...@microsoft.com] > Something magical happens here. The use of super() is supposed to call the > constructor of the HTMLElement class—but that’s not a normal JS class. It > doesn’t have a defined constructor() method [yet?]. Yep. We'd need to define o

Two new custom elements ideas

2015-07-17 Thread Domenic Denicola
Hi all, Over the last few days I’ve worked on two new potential ideas for custom elements, hoping to shake things up with new possibilities. These are both largely geared around how we react to the key custom elements question [1]. https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Op

Re: alternate view on constructors for custom elements

2015-07-17 Thread Boris Zbarsky
On 7/17/15 2:03 PM, Travis Leithead wrote: Something magical happens here. The use of super() is supposed to call the constructor of the HTMLElement class—but that’s not a normal JS class. It doesn’t have a defined constructor() method Sure, but neither does Array. What super() actually does i

RE: alternate view on constructors for custom elements

2015-07-17 Thread Travis Leithead
From: Domenic Denicola [mailto:d...@domenic.me] > >From: Travis Leithead [mailto:travis.leith...@microsoft.com] > >> Something magical happens here. The use of super() is supposed to call the >> constructor of the HTMLElement class—but that’s not a normal JS class. It >> doesn’t have a defined

RE: alternate view on constructors for custom elements

2015-07-17 Thread Domenic Denicola
From: Travis Leithead [mailto:travis.leith...@microsoft.com] > if super() is absolutely required for a constructor in a class > that extends something, is there a requirement about when in the > constructor method it be invoked? Must it always be the first call? Can it be > later on, say at the en

Re: alternate view on constructors for custom elements

2015-07-17 Thread Ryosuke Niwa
> On Jul 17, 2015, at 1:14 PM, Travis Leithead > wrote: > > From: Domenic Denicola [mailto:d...@domenic.me] > >>> window.XFoo = document.registerElement(‘x-foo’, XFooStartup); >> >> Why is XFoo different from XFooStartup? If I define a method in XFooStartup, >> does it exist in XFoo? > > T