RE: Custom element lifecycle callbacks

2015-01-09 Thread Domenic Denicola
From: annevankeste...@gmail.com [mailto:annevankeste...@gmail.com] On Behalf Of Anne van Kesteren On Fri, Jan 9, 2015 at 3:30 AM, Adam Klein ad...@chromium.org wrote: Do you have a proposal for where these symbols would be vended? My idea was to put them on Node or Element as statics,

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 9:33 AM, Anne van Kesteren wrote: On Fri, Jan 9, 2015 at 3:09 PM, Boris Zbarsky bzbar...@mit.edu wrote: In any case, the fact that we're even _having_ this discussion and that it needs careful reading of the HTML spec is my point. It does seem however we could define this in a way

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Thu, Jan 8, 2015 at 5:54 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 1/8/15 10:56 AM, Anne van Kesteren wrote: 2) For normal elements we act directly when they are cloned or adopted. How much interest is there in delaying what happens for normal elements to align them with custom elements?

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 3:30 AM, Adam Klein ad...@chromium.org wrote: Do you have a proposal for where these symbols would be vended? In ES, builtin symbols are available as properties on the Symbol object, but clearly WebIDL shouldn't be adding things there. This might be a good question for

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 12:29 PM, Boris Zbarsky bzbar...@mit.edu wrote: Ok, what about this testcase: var parent = document.createElement(x-my-element); var input = document.createElement(input); parent.appendChild(input); input.value = file:///etc/passwd; parent.cloneNode(true);

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 8:46 AM, Anne van Kesteren wrote: As far as I can tell from the specification, when the value IDL attribute is in the filename mode, any values that might be stored in internal slots are ignored. Hmm... That was not obvious to me, but OK. I guess it uses the list of selected files

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 3:09 PM, Boris Zbarsky bzbar...@mit.edu wrote: In any case, the fact that we're even _having_ this discussion and that it needs careful reading of the HTML spec is my point. It does seem however we could define this in a way that is safe. -- https://annevankesteren.nl/

Re: Custom element lifecycle callbacks

2015-01-09 Thread Anne van Kesteren
On Fri, Jan 9, 2015 at 2:29 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 1/9/15 7:14 AM, Anne van Kesteren wrote: OK. So just to be clear, the type will be set before the input's cloning callback runs, yes? Yes. It's a bit unclear to me why When an input element's type attribute changes

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 7:14 AM, Anne van Kesteren wrote: Both parent and input need to be cloned in this case. While parent's callback runs it changes the type of input, at which point input's callback runs. So, yes. OK. So just to be clear, the type will be set before the input's cloning callback runs,

Re: Custom element lifecycle callbacks

2015-01-09 Thread Boris Zbarsky
On 1/9/15 4:28 AM, Anne van Kesteren wrote: On Thu, Jan 8, 2015 at 5:54 PM, Boris Zbarsky bzbar...@mit.edu wrote: var input = document.createElement(input); input.value = file:///etc/passwd; var newInput = input.cloneNode(); newInput.type = file; Note that in the above example

Re: Custom element lifecycle callbacks

2015-01-08 Thread Adam Klein
On Thu, Jan 8, 2015 at 7:56 AM, Anne van Kesteren ann...@annevk.nl wrote: 1) Can we use symbols to identify these instead? That gives us a guarantee they won't be used for other things and makes it somewhat safer to put them where they are located now. As Dimitri noted, I've expressed mild

Re: Custom element lifecycle callbacks

2015-01-08 Thread Dimitri Glazkov
On Thu, Jan 8, 2015 at 7:56 AM, Anne van Kesteren ann...@annevk.nl wrote: 1) Can we use symbols to identify these instead? That gives us a guarantee they won't be used for other things and makes it somewhat safer to put them where they are located now. cc'ing a few folks I heard expressing

Re: Custom element lifecycle callbacks

2015-01-08 Thread Boris Zbarsky
On 1/8/15 10:56 AM, Anne van Kesteren wrote: 2) For normal elements we act directly when they are cloned or adopted. How much interest is there in delaying what happens for normal elements to align them with custom elements? Which things are we talking about delaying? I'm pretty sure the