16:04:48 RRSAgent has joined #webapps 16:04:48 logging to http://www.w3.org/2014/04/11-webapps-irc 16:04:57 alia has joined #webapps 16:05:12 aizu has joined #webapps 16:05:18 RRSAgent, log spans midnight 16:05:18 I'm logging. I don't understand 'log spans midnight', ArtB. Try /msg RRSAgent help 16:05:53 Arrrno has joined #webapps 16:06:30 ScribeNick: ArtB 16:06:34 Scribe: Art 16:06:47 krisk has joined #webapps 16:06:51 Present+ Arnaud_Braud 16:06:54 israelh has joined #webapps 16:06:59 Present+ Takeshi_Yoshino 16:07:22 Meeting: WebApps f2f Meeting (San Jose CA US) 16:07:38 http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0074.html 16:07:53 present+ krisk 16:08:06 present+ dglazkov 16:08:14 -[IPcaller] 16:08:28 Agenda: https://www.w3.org/wiki/Webapps/April2014Meeting 16:08:36 present+ israel hilerio 16:08:41 adrianba has joined #webapps 16:08:41 +[IPcaller] 16:08:41 Present+ Art_Barstow 16:08:42 Present+ Anssi_Kostiainen 16:08:45 Present+ Ali_Alabbas 16:08:46 Present+ Yves_Lafon 16:08:50 BenjamP has joined #webapps 16:08:51 rniwa has joined #webapps 16:08:54 Zakim, [IPcaller] is Olli_Pettay 16:08:54 +Olli_Pettay; got it 16:08:54 Present+ Chris_Wilson 16:08:54 present+ israel_hilerio 16:08:54 Present+ Feras_Moussa 16:08:55 Present+ MichaelTmSmith 16:08:57 Present+ John_Hazen 16:08:59 Present+ Matt_Falkenhagen 16:09:01 Zakim, nick smaug is Olli_Pettay 16:09:01 ok, smaug, I now associate you with Olli_Pettay 16:09:07 Present+ Ben_Peters 16:09:16 Present+ Adrian_Bateman 16:09:44 zqzhang has joined #webapps 16:09:47 Present+ Hayato_Ito 16:10:01 Present+ Zhiqiang_Zhang 16:10:06 Deen_King-Smith has joined #webapps 16:10:33 Deen_King-Smith has left #webapps 16:10:48 dksmith has joined #webapps 16:10:52 RRSAgent, meeting spans midnight 16:11:05 opoto has joined #webapps 16:11:13 present+ Olivier_Potonniee 16:11:23 xiaoqian has joined #webapps 16:12:35 +[Paypal] 16:12:58 hello all 16:13:47 genelian_ has joined #webapps 16:14:12 present+ Gene_Lian 16:14:42 jinsong has joined #webapps 16:14:55 zakim, who's here? 16:14:55 On the phone I see ??P2, Olli_Pettay, [Paypal] 16:14:57 On IRC I see jinsong, genelian_, xiaoqian, opoto, dksmith, zqzhang, rniwa, BenjamP, adrianba, israelh, krisk, Arrrno, aizu, alia, RRSAgent, Zakim, Bin_Hu, FerasM, lmclister, smaug, 16:14:57 ... john_hazen, ArtB, anssik, chaals, stryx`_, astearns, richt_, dom, skddc, hayato, kochi, paul___irish, krijnhoetmer, tobie__, morrita, slightlyoff, dfreedm_, cwilso, timeless_, 16:15:01 ... scheib__, jsbell, dcooney, dglazkov, cabanier__, krit, tyoshino, hober, falken, Domenic_, pdr__, gavin, tzik, shepazu, jgraham, decadance, gsnedders, heycam|away, schuki 16:15:23 RRSAgent, make minutes 16:15:23 I have made the request to generate http://www.w3.org/2014/04/11-webapps-minutes.html ArtB 16:16:54 Zakim, who's on the phone? 16:16:54 On the phone I see ??P2, Olli_Pettay, [Paypal] 16:17:25 jmajnert has joined #webapps 16:17:31 zakim, ??P2 is me 16:17:31 +anssik; got it 16:18:31 jungkees has joined #webapps 16:18:38 Present+ Jungkee_Song 16:19:34 Travis has joined #webapps 16:20:22 Topic: Web Components 16:20:32 scribe: israelh 16:21:35 plh has joined #webapps 16:21:51 dglazkov: WOuld like to break down discussion into three topics: Shadow DOM, Custom Elements, and HTML Inputs 16:21:54 aizu has joined #webapps 16:22:00 s/Inputs/Imports/ 16:22:13 ... Shadow DOM is the more interesting. Let's pick which one we want to discuss first. 16:22:25 ... Start with Custom Elements ? 16:22:33 s/WOuld/Would/ 16:22:39 ... Shadow DOM after that? 16:22:54 ... Custom elements is in first draft 16:23:05 https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html -> Custom Elements Editor's Draft 16:23:17 https://www.w3.org/Bugs/Public/show_bug.cgi?id=24578 16:23:23 ... And interesting topic to start with 24578 buhg 16:23:30 ... Registering a register primitive 16:24:27 ... Having the ability to expose internal attributes on Customer elements allow you to clone it, assing it to a different document 16:25:02 https://www.w3.org/Bugs/Public/show_bug.cgi?id=20567#c69 -> Anne's comment #69 for bug 20567 16:25:21 ... The idea is that when an element is adopted from one doc to another, and as an an author of the element you will get a callback that allows you to reason about the attribute being used in other elements 16:25:58 ... also, the idea that you could use the registry as a way to scope the element names. 16:26:24 alia has joined #webapps 16:27:27 alia_ has joined #webapps 16:28:04 ... a web developer has a sub-tree in their document and would like to parse their specific elements from the local registry. Having a scoping concept would be very useful for them. However, if you want to rountrip when coming back form the parse you would have problems 16:28:22 ... because when you serialize the tree the parse would have no idea of where that element came from, thus surprising. 16:28:45 ... I would like to introduce the registry concept into the spec and see where it goes from there. 16:29:03 ... I want to allow allowNode callback to reason about registries. 16:29:21 ... I would like to get everyone's opinion about it. 16:29:48 rniwa: What is the use case for the callback. 16:30:34 dglazkov: deeper into this subject. IE and FF have a behavior that is different from blink and WebKit and their prototype when it is adopted from another doc. 16:30:58 ... IE and FF when you are adopted from one doc to another, you loose your old prototypes. Blink and WebKit don't do that. 16:31:11 ... there is disagrements whether this should be on spec. 16:31:51 ... the callback we are discussing provides a mechanism to allow elements to update the prototypes dynamically. Thus, becoming and implementation detail instead of part of the spec. 16:32:32 rniwa: it might be more useful to standardize the UA behaviors instead of putting this on the hands of the devs. 16:33:09 dglazkov: for custom elements this decision is not so clear. It is not always clear what is the right behavior. Specially if the definintion of my element is not defined on the new environment. 16:33:30 ... element foo may colide with a different definition of another element foo on that document. 16:33:59 rniwa: it seems strange that each doc would behave diff on each environment. It doesn't allow you to reason about the custom element on the environment that is being used. 16:34:24 dglazkov: this seems bad if you don't have the ability to reason about the custom elements diff. 16:34:30 adrianba: it would be bad. 16:35:03 rniwa: it seems like we need to figure out how we can guarantee that the custom element keeps the same information across document. Maybe this is the issue. 16:35:19 dglazkov: that is what registers let you do. You can look at the registry and reason about this. 16:35:55 rniwa: potentially you can have a global map for each page. that checks if the definition of the class has been raised and possibly rejected. Some type of consistency check. 16:36:29 ... we probably don't want to reason about having different custom elements that are of the same expected type. 16:36:52 dglazkov: the thing is that it doesn't have to be the case, the problem is that the scenario could happen and we need to figure out how to deal with this. 16:37:41 rniwa: for ex. you can imagine the registry happening about all in one script context, within one navigation. 16:38:14 dglazkov: there is a specific reason the registry is scoped to the doc. because each doc could have its own set of elements. 16:39:00 ... in xhr docs don't have a registry for custom elements and don't run script. 16:39:17 ... there is no document in browsing context. there is no association between document and browser context. 16:39:35 rniwa: in the case of XHR, there isn't any document context. 16:40:06 dglazkov: the create implementation of create document should have a document context. 16:40:17 KenjiBX has joined #webapps 16:41:08 ... (looking at spec chapters looking for something ) 16:41:31 s/document context/browsing context/ 16:42:27 ... creating and passing a regisry section, we do associate a new registry at that point when creating a new import document (those things don't have a browsing context but are able to operate as if they had a registry) 16:42:51 ... It is a good idea to look at this bug 20567 and understand what needs to be done here. 16:43:00 https://www.w3.org/Bugs/Public/show_bug.cgi?id=20567#c69 16:43:22 rniwa: exposing a list of custom registries seems like a good thing. but I'm not sure how the ability to update the definition of the doc using this information is a good idea. 16:43:51 adrianba: if you end up with a button and import a different button (but when looking at the elements they look the same) that seems like a bad situation. 16:44:24 dglazkov: I agree this is a bad situation, that is what we are trying to solve. 16:44:40 ... this is not a use case, it is more of how do we deal with this if it happens. 16:44:54 adrianba: can we just say that the call fails and the element doesn't work. 16:45:40 dglazkov: it seems reasonable to make it work, however we need to reason about their seirialization differences. 16:46:26 adrianba: can we clone the prototype? 16:46:47 ... if we import from one doc to another and then clone the prototype things might work. 16:47:42 dglazkov: I'm not sure there is a concept of cloning the prototype. the notion that you are attached to the old world, where someone creates a doc, registers things to it, import those notes, but not sure why you would do that although it is supported. 16:48:04 rniwa: maybe we could have the registry that is shared across elements that come from the same origin. 16:48:33 what does cloning the prototype mean? should the expando properties from the old prototype be cloned too? 16:48:55 ... if we do that, we have the same issue where one prototype has multiple def, but if we had this mechanism (park all docs in the same origin) we might be okay if registration is simulatneous. It would reduce the instance in which the def are diff. 16:49:23 mjs has joined #webapps 16:49:24 ... after we create the object, that doesn't mean that the two objects are the same. 16:49:28 q+ 16:49:41 dglazkov: if you want to compare, you would have to introduce the abiltiy to compare diff between elements. 16:50:26 rniwa: if we allow customents, we need to provide that ability to compare themselves. This could be a big developer issue. We need to come up with a solution where we don't burden the author of the custom element. 16:51:31 ack mjs 16:51:54 mjs: clarification, do we have the usecase for adapt a custom element from one doc to another, is this a real case or theoretical. 16:52:13 adrianba: is the situation where the custom element has the same name but a different instantiation 16:52:44 mjs: can we just let this scenario fail, or do we need to support it? failing seems like a good approach if this is an edge case. 16:53:10 dglazkov: I didn't say this wasn't sufficient, i would like to reduce the number of errors we throw. 16:53:26 ... yes it simplifies but it will likely anoy the developer. 16:53:46 mjs: It will only anoy the author if this is a common case, otherwise he should be okay. 16:53:53 +q 16:54:23 kochi_w3c has joined #webapps 16:54:23 dglazkov: there are many shades of gray here. There is a reasonable situation with HTML templates when you are moving from a template to the main document. We need to support this situation, we don't want to throw. 16:54:38 q? 16:54:43 mjs: there are simple behaviors we could support without throwing. 16:55:14 ... (talking about possible options). buttom line we should err on the side of simplicity. 16:55:39 msg &systeam triple checked which passwd, the old or the new one? ;) 16:55:51 dglazkov: the main case where we need to do the right thing is when we deal with multiple docs that are import docs and templates. Those things have to work, if we start messing with the definitions there we are in trouble. 16:55:59 s/msg &systeam triple checked which passwd, the old or the new one? ;)// 16:56:09 mjs: import docs share the same registry. 16:56:33 ... requiring docs to deal with extra complexities seems difficult to address as a component author. 16:57:17 dglazkov: what complexity are you talking: adapt mode callback and registry? The adopt mode callback allows for changes to be reacted when loading resources. 16:57:41 mjs: do custom elements allow for remove and insert into documents? 16:57:43 dglazkov: no 16:58:22 mjs: adapt doesn't seem like a special case unless, many people have already created custom elements without this functionality. 16:58:49 dglazkov: not sure how DOM core works here. Anne had some ideas here. We can definetely talk about the importance of this callback. 16:59:13 mjs: what is the correct venue to discuss this? 16:59:20 dglazkov: 20567 bug is the right venue for this. 16:59:30 ack next 16:59:40 +q 16:59:49 KenjiBX: 17:00:25 KenjiBX: it seems there is no real case, and the conclusion is to make it fail. If we find out later that there is a use case, can we then deal with this situation. 17:01:23 dglazkov: I beleive this is reasonable. That is the reason I wanted to bring it up to the group. I wanted to get everyone's opinion in the need to register. I will put it in the back burner. THere are some usescases that might help. I'm not feeling the love right now. 17:01:47 ... we can talk about the difference between adoption and registration. 17:01:58 ack rniwa 17:02:07 mjs: adpation node without inserting anywhere is very rare, (doesn't seem to happen). 17:03:47 ... if they were to change to insert doc and remove doc, then we could easily look for customer default view. if we had that, elements could check that. If I had the option of adding the adapt callback then I would prefer the ability to inserting attach and detach. 17:04:02 Present+ Maciej, Laszlo_Gombos, Alex_Russell 17:04:27 mjs: if we had remove and insert, we could simplify the operations. 17:04:37 tantek has joined #webapps 17:04:50 dglazkov: please provide feedback on bug and state your opinion, it could be that what you are suggesting is good enough. 17:05:15 mjs: maybe we should have a different bug on remove and add callback 17:05:41 https://www.w3.org/Bugs/Public/show_bug.cgi?id=24577 17:05:49 dglazkov: there seems to be one bug on this (24577) 17:07:23 mjs: I think Anne in this bug is looking at the leaking of the entire document when the element moves. 17:07:53 dglazkov: any help here would be appreciated, maybe if we solve this problem we might be in good shape for the previous bug. 17:08:14 mjs: It seems like letting thing fails would be the initial good approach for this. 17:08:37 ... perhaps the concept of a global registry that is shared everywhere could be an interesting approach. 17:09:13 dglazkov: let's work on these two bugs and discuss the possibility to add remove and add from document concepts. 17:09:57 dglazkov: is the ship in the water or the deep in the ground :-) 17:10:05 Scribe: Ali 17:10:09 ScribeNick: alia 17:11:10 dglazkov: I need something in my custom elements to mean something different. Use case: I'm building a framework. Custom elements are in and out of the framework. Inside is the plumbing that uses custom elements because it's useful. How to separate the two and don't expose to each other. 17:12:13 RRSAgent, make minutes 17:12:13 I have made the request to generate http://www.w3.org/2014/04/11-webapps-minutes.html ArtB 17:12:14 ... Shadow DOM is a good example. Parser is per docment. But that seems like a bad idea. Maybe we could let the frameworks define the registry that contains the internal plumbing and feed it to innerHTML of the fragment parsing of the shadow trees that they're creating so that when they create these things they get the definitions of these outside elements. 17:12:33 RRSAgent, make log Public 17:12:48 q+ 17:12:53 RRSAgent, make minutes 17:12:53 I have made the request to generate http://www.w3.org/2014/04/11-webapps-minutes.html ArtB 17:13:16 ... Allows the ability to scope the parser. Bringing up here. Give me a doc registry and add stuff to it. May have a method that is in addition to pass the registry. 17:13:21 Lachy has joined #webapps 17:13:47 ... Can put things in template and as it's being inserted into the shadow tree, they will be inflated the proper way. Not sure if this is outlandish or crazy or both. 17:14:37 ack mjs 17:14:44 mjs: Want to understand the use case better. Two possible meanings. An element that is used in the light DOM. TR in TABLE. TR outside of TABLE is not sensical. Other compound elements that have these structures. Want to have some elements as implementation details. 17:15:34 dglazkov: You're right on. Shadow DOM is the prime use case, but there are some thoughts on this in light DOM. Parent changes the meaning of the element outside. 17:16:02 mjs: Need different ways of dealing with these two cases. Need an attachment of the custom element to be conditional based on the parent element. 17:16:10 ... Which do we want? 17:16:33 dglazkov: I don't care how it's fixed, but we need a fix. In my mind, having meaning changed based on the parent is a path to madness. 17:16:53 q? 17:17:03 mjs: Want to refactor internal implementation. Two completely different use cases. 17:17:36 dglazkov: When a developer has no Shadow DOM, they only have one of them. Here is my internal and external stuff. Spoken from a developer who has not ever had a shadow tree. 17:17:54 q+ 17:18:33 alexrussel: We don't know what we don't know in this area. We don't know what people actually want to do. If we make it possible to create new local namesets, it removes any incentive to agree on global names. We lose our ability to define elements and custom semantics. Would lose value on the web. 17:19:46 mjs: Depends on which use case. Some degree of global agreement. There can be imports, but some internal that it can use. Cleaner way to do it, than have scoped registry. Only some of the names I define can be exported. May change the way the that import function works, so it is not suggested we do it right now. 17:20:18 ... TR almost makes sense in the context of the TABLE element. There are specific elements that are defined in this hierarchy. 17:21:09 ... It seems obvious that people would want to build things like this. It clearly is a use case. Do not agree with using private names would reduce incentive to create global names. 17:21:38 ... Get developers to participate in the group so we can have a direct conversation with them to understand the use cases better. 17:22:04 ... It would help if you want clarification on this feedback to ask them directly. 17:22:09 dglazkov: I will try to get people. 17:22:23 ... We have beaten this registry thing pretty well. Moving on to custom elements. 17:22:55 ... I want to tackle exposing element on callback queues first. 17:23:07 http://lists.w3.org/Archives/Public/public-webapps/2014AprJun/0074.html -> Dimitri's topic list 17:23:20 ... There was a valid point brought up that custom element spec reminds us of a special kind of mutation observers. 17:24:22 jsbell_ has joined #webapps 17:24:31 ... In the custom elements spec, in queueing and invoking callback. The general idea is there is a quantum of time for invoking callbacks that is different than queueing callbacks. Might be a good idea to expose this a mutation observer so that developers can start using it directly. 17:24:37 ... Want to gauge opinion. 17:25:24 https://www.w3.org/Bugs/Public/show_bug.cgi?id=24579 17:25:39 FerasM has joined #webapps 17:25:48 rniwa: Only feedback is that it is vaguely specified. Transitioning between scripts. Multiple stacks of user scripts and user agent scripts that would result in messy situation. Running two user scripts with an interleaved DOM script based on the spec's wording. Could use more clarification. 17:26:21 dglazkov: Posted a bug 24579. After callback, drain the pool, so that we can fix the problem 17:27:02 mjs: Super inconvenient because every native method that does this wouldn't require annotation. If implementations are done in native and client code, the draining needs to be conditional. There are some cases when this could happen. 17:27:48 dglazkov: This is a separate topic and so we need to separate the abstractions. Need to separate the quantum of time for callbacks and queueing. Start trusting it in a certain point in time and stop at a certain point in time. 17:27:59 ... Only a few methods that do this. 17:28:16 mjs: There are many methods that don't mutate DOM but could mutate script that mutate DOM. 17:28:32 https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/Element.idl 17:29:24 dglazkov: Already done this in Blink, if you look at the element.IDL, you would see a bunch of Custom element callbacks. Some of them, some will, but it's not really that bad. 17:29:36 mjs: Let me ask a specific quesiton, does dispatch event have this notation? 17:29:44 ... Could retake the DOM. 17:29:52 dglazkov: Dispatch event itself does not mutate DOM. 17:30:11 q? 17:30:34 ... In the event handler will have its own draining which will arrive at a consistent state. 17:30:51 mjs: Will always be at a safe point in this case. 17:31:00 ack rniwa 17:31:22 Just FYI: https://code.google.com/p/chromium/codesearch#search/&q=CustomElementCallbacks%20file:idl 17:31:27 s/could mutate script/could include script/ 17:31:30 dglazkov: Trying to wrap up mutation events. Did not participate in mutation observers but will give it a shot and see what I can come up with. 17:32:24 rniwa: Jonas pointed out on one of the threads is that mutation observers calling each other back while in an observer itself, with this new nano task timing, it's possible to create an element in the observer and that could create an issue. 17:33:43 dglazkov: When changed to a generic mechanism, but solved by queues. Need to look into this in more detail. Mutation observer observes per element, narrowed down. An element queue and a callback queue, and every element has an element queue, separating these out allows for handling this in a consistent fashion. 17:34:10 rniwa: Trying really hard to solve issue where removing the element itself. 17:34:45 dglazkov: Going to see them being called in the same order for consistency. If observing yourself, you see that you are being attached. 17:35:03 mjs: I don't think that's the biggest problem. The problem is that attaching can occur inside the attach. 17:35:53 ... In attach callback that removes a node, inside the attach, document.body.appendChild(this). Inside that attach, you would insert back in the document, at which point you would be calling attach again. 17:36:51 dglazkov: The element queue solves this. While inside of the attach handler, you won't hear any callbacks until completion. What is the element that you're procesing and which is the callback you're processing is asked when there is an execution. 17:37:25 rniwa: Attach will be called, but the detach will be called later. 17:37:37 mounir has joined #webapps 17:37:44 dglazkov: After finishing running callback of attach, then attach would occur. 17:38:23 q? 17:38:48 ... When using element callbacks, you have to rely on what the callbacks tell you, because the state is going to tell you either you're going to observe the outside world or only the callbacks that arrived. If you have been detached despite having been attached, it will work because you can trust the callbakcs. 17:38:59 s/callbakcs/callbacks 17:39:53 rniwa: In the custom code, there may be some event that asynchronously causes issues. 17:40:28 ArtB: Now going to break, coming back at 11. 17:43:01 marcosc has joined #webapps 17:59:44 RRSAgent, make minutes 17:59:44 I have made the request to generate http://www.w3.org/2014/04/11-webapps-minutes.html ArtB 18:02:03 krisk has joined #webapps 18:02:06 scribe: krisk 18:02:46 darobin has joined #webapps 18:03:24 -Olli_Pettay 18:03:38 (another meeting) 18:03:52 rniwa has joined #webapps 18:04:32 plh has joined #webapps 18:04:34 kochi_w3c has joined #webapps 18:05:12 artb: proposes to have a meeting once in a while for web components 18:05:15 mjs has joined #webapps 18:05:16 ACTION: barstow work with Dimitr re a Web Components calls/meetings 18:05:16 Created ACTION-727 - Work with dimitr re a web components calls/meetings [on Arthur Barstow - due 2014-04-18]. 18:05:27 ACTION: artb setup semi regular meeting for web components 18:05:27 Created ACTION-728 - Setup semi regular meeting for web components [on Arthur Barstow - due 2014-04-18]. 18:05:32 TOPIC: Custom Elements 18:05:44 ..automatic upgrade of custom elements 18:06:04 dglazkov: I'd like to present a use case for this.. 18:06:13 ..after an element is registered 18:06:42 ..section 7 in spec, step #7 (run element upgrade algo) 18:07:38 If an element in or outside of a tree when the registation comes around the element will take the right shape 18:08:10 The key use case was that when we would run queryselector would not work (shadow doms) 18:08:20 ..we wanted to make this easier for devs 18:08:48 The side effect is that a sync loaded document, framework devs want to get to a consistent state and don't want to do extra work 18:09:20 ..When I talked to amber, they were very unhappy I removed this from the spec (which I didn't) and then they were very happy 18:10:04 ..They don't want to have to deal with ambiguity when this element will be completed 18:10:34 It's basically queryselectorall'ible everywhere 18:10:53 mjs: Some people from apple don't like this... 18:11:18 ..You want to load some custom element - three problems 18:11:46 ..web page load parse is slow, forces UA do display partial display 18:12:05 ..Manually have to go check or manually upgrade these elements 18:12:21 If you just want to know when the state is done and complete 18:12:45 ..you could wait until all are done loading, not optimal, if one set if slow 18:13:30 The third option is what is in the spec, if you access the element before the upgrade has been complete you have a problem 18:13:50 ..which is a hazard - accessing an html element proto 18:13:58 ..so you have to wait 18:14:14 Either way you better not do any scripting untill all is complete 18:15:07 dglazkov: The key part you can access this until the upgrade has completed 18:15:17 mjs: you can't save a ref 18:15:38 dgazkov: it will always be the same ref 18:15:57 .The swizzle doesn't modify the change... 18:16:41 ..we ensure the swizzle only adds more items on top of the proto 18:17:48 mjs: Let me ask a clarifying question.. 18:18:13 dglazkov: you can't go from select to my custom select 18:18:31 mjs: can you not only do this with a generic html element? 18:19:30 dglazkov: you need to specificaly call to extend select 18:19:37 arunranga has joined #webapps 18:20:19 dglazkov: this make sure that you only insert items at the top of the prototype chain 18:20:41 ..Then you can save, set prop, to the elements, etc... 18:21:05 ..before the upgrade 18:21:35 mjs: It seem that from the 3 possible choices, we don't want the bad perf. 18:22:28 mjs: you have the hazard or you get the work done but the the proto-type may not be perfect until the upgrade is complete 18:22:49 ..It's not required but a nice to have in the base system 18:23:19 dglazkov: We have to make sure that with multiple frameworks need a single 'go' 18:23:51 mjs: one for of this would be a single event for all is one possible solution, not that I'm saying this is the best solution 18:24:13 alex: feedback from users has been pretty strong that not having this ability is bad 18:24:51 mjs: how we choose to do 'science' compared to asks from feedback? 18:25:26 rniwa: For page that use the old style (display:none).. 18:25:47 dglazkov: that has never been the case - psudeo - unresolved whould be the 'match' 18:26:09 rniwa: so now if you have some component that load sync, you have to have some style that uses component 18:26:26 (I also added that strong feedback across multiple toolkits/users is distinct from weak feedback) 18:27:42 dglazkov: this is not a problem at least in webkit and blink 18:28:07 dglazkov: the problem we have seen is you really can only do display:none or a block 18:28:18 rniwa: let me make my point 18:29:11 ..if the author had to specify the style for an unresolved element, which will not be consistent on page load times 18:29:16 lmclister has joined #webapps 18:29:37 ..Their is basically no way to get consistent results of the element rendering 18:30:03 dglazkov: This has nothing related to upgrade mechanism 18:30:12 KenjiBX has joined #webapps 18:31:10 mjs: one use case, could be a select control that shows up like a map 18:31:33 ..before the upgrade it would look ugly until the upgrade has occured. 18:31:45 ..even display: none would be ugly 18:31:58 ..no real way exists to fix this problem 18:32:31 alex: we shoud ask css to help to get a mechanism to be in control of the display/paint/rendering can start 18:33:38 dglazkov: web devs do bad patterns to try to control this pattern, like in editing.. 18:34:02 ...one framework uses document.write... 18:34:56 rniwa: can we take this upgrade to the mailig list? 18:35:05 dglazkov: sure 18:35:19 tantek_ has joined #webapps 18:35:29 rniwa: To help close on the flash of styling issues 18:35:45 TOPIC: Shadow Dom 18:35:56 smaug: are you there? 18:36:01 just a sec 18:36:03 yves will now scribe! 18:36:05 scribe: Yves 18:36:10 now 18:36:12 +[IPcaller] 18:36:45 Zakim, [ is smaug 18:36:45 sorry, darobin, I do not recognize a party named '[' 18:36:52 Zakim, +[ is smaug 18:36:52 sorry, darobin, I do not recognize a party named '+[' 18:37:28 good 18:37:39 https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887 18:38:58 https://etherpad.mozilla.org/RKukNtHHlO 18:39:09 rniwa: issue is about nested shadow dom 18:39:25 dglazkov: etherpad above has canonical examples 18:40:32 skddc_ has joined #webapps 18:41:59 rniwa: why firing the even at the last insertion point is not enough? 18:42:50 dglazkov: as the insertion point is at the most nested place, the nesting shadow tree does not hear the event 18:42:59 s/the even at/the event at/ 18:43:52 one solution was to generate interim div to listen to the insertion point, which is bad as well 18:43:55 q? 18:44:15 the specs breaks the invariant that item in the even path are always children of the next item 18:46:09 rniwa: is the spec bz's proposal? 18:46:27 dglazkov: no it's the other one 18:47:06 ++ rniwa 18:49:05 (Hayato Ito describes the alg) 18:52:18 Hayato: the second algorithm has more complexity 18:53:27 dglazkov: I agree that preserving the invariant is desirable 18:53:41 more ++ to rniwa 18:53:56 rniwa: were you surprised somehow? 18:54:25 rniwa: to me, bz's proposal make more sense. Much easier for developers 18:54:43 ArtB: looks like we have a way forward here 18:56:57 maciej: how about discussing encapsulation? 18:57:17 ScribeNick: darobin 18:57:38 http://lists.w3.org/Archives/Public/public-webapps/2012OctDec/0312.html 18:57:44 mjs: back in Dec 2012 we had a big discussion about Components and traversability of the shadow DOM and how that relates to encapsulation 18:57:48 ... the upshot was this 18:58:00 ... previous to that the shadow was not traversable from the outside, after it was 18:58:17 ... we tentatively agreed that it made sense to provide both public and private modes, and even a more isolated mode 18:58:29 ... I would really like it if at least the public and private mode could both be supported 18:58:39 ... isolated mode has some design that needs to be investigates 18:59:01 ... private might be the wrong name, give the impression of a security boundary, we could say open/closed 18:59:17 ... I'd really like to address this before it's too late to make changes to how shadowRoots work 18:59:23 ... what can I do to help move this forward? 18:59:36 dglazkov: I totally want to do these modes 18:59:58 ... because of the opacity of the style engine we don't have a great way of controlling this 19:00:01 ... in JS it's easy 19:00:11 ... but for styling we don't have a way to prevent this 19:00:20 ... I udnerstand the need for it, I want to add it to the spec 19:00:33 ... I can make it the next thing I work on 19:00:44 https://www.w3.org/Bugs/Public/show_bug.cgi?id=20144 19:00:45 s/udnerstand/understand/ 19:01:01 dglazkov: the way I thought I'd tackle this problem 19:01:13 ... today you don't pass anythin when you create a shadow 19:01:18 ... we could pass in a property bag 19:01:29 ... I would suggest a string value so that we can add isolated later 19:01:48 s/... I would suggest/mjs: I would suggest/ 19:01:57 dglazkov: maybe we could close style separately 19:02:21 hallvors has joined #webapps 19:02:24 mjs: there are interesting side effects with querySelection then 19:02:34 dglazkov: so it could be a single flag 19:02:51 ... the ability to look inside is important because tools need introspection 19:03:09 mjs: it doesn't make sense to do these separately (matching selectors, looking into the DOM) 19:03:15 ... because you can use one to do the other 19:03:22 dglazkov: I think that's reasonable 19:03:44 mjs: if it's a string, we can add one later. Scales better than bag of booleans 19:04:00 dglazkov: we have to prevent people to style into built-in element, so we have this mode 19:04:26 ... to me it was literally a matter of getting to do this, got distracted 19:04:34 ... I can start working on this 19:04:46 mjs: I'm willing to offer help with reading, implementing, etc. 19:04:51 ... I'm very interested in getting this in 19:05:09 ... I thikn it's a fundamental building block for fully isolated components, which I think are a great use case 19:05:26 dglazkov: I've also been looking at implementing all the HTML elements as custom elements 19:05:31 ... so this is useful for that too 19:05:39 MikeSmith: I went to create a bug on the Shadow Styling spec, blocked on 20144, but there's no component for it in Bugzilla. 19:06:22 rniwa: should we discuss which should be the default? 19:06:26 [hilarity ensues] 19:06:41 mjs: let's do the uncontroversial part first, debate later 19:06:48 dglazkov: next? 19:07:05 mjs: isolation? 19:07:21 dglazkov: I would like insight 19:07:26 mjs: one thing I noted in the bug 19:07:43 ... there are 2 things you need, DOM encapsulation, and a walled-off scripting environment 19:07:50 ... no global namespace, clean prototypes 19:08:08 https://www.w3.org/Bugs/Public/show_bug.cgi?id=16509 19:08:10 ... you also need sanitising paramters passed in and their return values from methods 19:08:23 ... you need to rewrap DOM nodes across the boundary 19:08:30 ... so you need Structured Clone Plus 19:08:39 ... otherwise you can pass trapped values 19:08:46 dglazkov: I think you're right.... eventually 19:09:06 mjs: if you want the page to be protected, you need a support mechanism other than script tag 19:09:12 ... you need to run script safely 19:09:25 ... XBL2 has a way of addressing things, you can import things 19:09:46 ... pretty different from HTML Import which has script run in your context 19:09:56 ... for safe imports you need a different mechanism 19:10:03 dglazkov: there's a proposal for a DOMWorker 19:10:11 ... a Worker that runs in your thread in step 19:10:22 ... postMessaging only, can be loaded x-origin 19:10:34 ... but once loaded is in its own worker 19:10:41 mjs: can it export its registration? 19:10:48 dglazkov: no, it works in its own shadow 19:10:54 ... the worker manages the element 19:11:07 ... the element acts from the outside as if it has a shadow tree but you can't get to it 19:11:15 ... but from the inside it has a shadowRoot 19:11:19 mjs: that seems insufficient 19:11:33 ... you need to be able to register from the inside and sanitisation at the boundary 19:11:48 slightlyoff: you can get that by reducing the surface area to attributes 19:11:54 ... forward the attribute changes 19:12:13 mjs: if your goal is to implement HTML this is not enough, elements need to expose APIs 19:12:23 dglazkov: I feel that HTML elements don't need that 19:12:41 mjs: e.g. video and canvas are useless without APIs 19:12:54 dglazkov: yes, but HTML does not need isolation 19:13:07 ... isolation is collaboration between components that don't trust one another 19:13:19 ... it seems to me the HTML elements model is different 19:13:31 mjs: HTML elements certainly don't trust the page 19:13:39 ... but I'm not sure that saves you a lot of complexity 19:14:04 ... HTML element have a membrane where elements are sanitised, more than cloning since it supports DOM nodes and such 19:14:31 dglazkov: you could define an IDL for contract 19:14:52 rniwa: in a way yes, we can create a wrapper object for the prototype and function calls are forwarded after sanitisation 19:15:17 mjs: in and out values get converted in the same way as they do for JS/C++ communication 19:15:36 slightlyoff: only asynchronous? 19:15:46 mjs: that's not powerful enough to implement HTML 19:16:01 ... do we need to be able to do HTML, or is "like HTML but asynchronous" enough? 19:16:06 dglazkov: I'd like to be able to implement HTML 19:16:16 ... as an aspirational goal, though maybe not reached 19:16:22 mjs: I think it's not impossible 19:16:28 ... XBL had something that was powerful enough 19:16:39 ... it's a question of what you're willing to give up 19:16:58 ... if DOM Workers are already in the same thread, then you don't lose much by allowing sync methods 19:17:10 ... it's important to be clear on whether something is an actual goal 19:17:39 ... as a reviewer I need to know what the goals are 19:17:46 dglazkov: so I think it's an actual goal 19:17:59 ... is the [Like] button thing the same scenario 19:18:06 ... as the built-in HTML elements 19:18:24 mjs: the like widget case it needs communication with the communication case 19:18:37 ... it would likely not be a dealbreaker to be limited to async and certain data type 19:18:54 ... HTML elements need sanitisation on the way in 19:19:13 ... returning values also, don't want anyone to violate my internal prototype 19:19:27 ... the only thing that the like widget stuff doesn't need is sync communication 19:19:41 ... so I think they're similar enough that you could use the same plumbing 19:19:53 slightlyoff: we will probably have to rely on ES6 Proxies to define the membrane 19:20:22 rniwa: if we really want to make everything async, we could have the wrapper return a Promise, and resolve when the method returns 19:20:39 ... there are many ways to solve the issue 19:20:46 dglazkov: structure this goal as this 19:20:56 ... we at the limit want to implement all of the HTML elements in JS 19:21:14 ... similar widgets with trust issues are lower-fidelity subcases of the same 19:21:42 rniwa: I'm not sure I agree with this, there are some really funky HTLM elements, do you want to implement ? 19:22:32 mjs: it's hard because either they'd have to be implemented in terms of existing elements or you'd need new primitives 19:22:51 ... also you don't want them to be able to change their parsing, e.g. reimplementing or