From jonas at sicking.cc Thu Oct 1 01:03:31 2009 From: jonas at sicking.cc (Jonas Sicking) Date: Thu, 1 Oct 2009 01:03:31 -0700 Subject: [whatwg] Async scripts In-Reply-To: <335a812d0909302214q62e18c97ua012390cd229f0bf@mail.gmail.com> References: <63df84f0909300136w6f32fc9an93bcb9bbde21a21d@mail.gmail.com> <335a812d0909302214q62e18c97ua012390cd229f0bf@mail.gmail.com> Message-ID: <63df84f0910010103i75fa45bfn28fc3b6119a1ba87@mail.gmail.com> On Wed, Sep 30, 2009 at 10:14 PM, Brian Kuhn wrote: > Does anyone know of any browsers actually planning to support the async > attribute? ?From the quick survey I've done, it doesn't appear they are. > ?Anyone have any thoughts on what's holding them back? I plan to implement it in Firefox, yes. / Jonas From jonas at sicking.cc Thu Oct 1 01:07:27 2009 From: jonas at sicking.cc (Jonas Sicking) Date: Thu, 1 Oct 2009 01:07:27 -0700 Subject: [whatwg] Async scripts In-Reply-To: References: <63df84f0909300136w6f32fc9an93bcb9bbde21a21d@mail.gmail.com> Message-ID: <63df84f0910010107n1fdb67dbo58a578e7974d9e79@mail.gmail.com> On Wed, Sep 30, 2009 at 10:14 PM, Darin Fisher wrote: > On Wed, Sep 30, 2009 at 9:59 PM, Darin Fisher wrote: >> >> On Wed, Sep 30, 2009 at 1:36 AM, Jonas Sicking wrote: >>> >>> There's two things that I don't understand about the 'async' attribute >>> on >>> ? ? >>> ? >>> ?... >>> >>> >>> In this example, if the first script is changed from being a "normal" >>> script (as above), to being a async script, that could lead to the >>> analytics script actually executing later. >> >> Did you perhaps mean to say "if both scripts are changed to being async"? >> If not, then I'm confused because you prefaced this example with "why are >> async >> scripts forced to run in the order they appear?in the markup?" >> I agree that normal scripts should not be deferred behind async scripts >> that >> happen to be listed before the normal scripts. ?I don't think that is the >> intent >> of the async script spec. >> -Darin > > D'oh, ignore me. ?I overlooked the "async" attribute on the second , so it sounds like adding the would be the more consistent method.
and can be kept the way they are, because they aren't problems, and tag when a source is specified. I believe that ended with something like, "we can't take it out without ruining support in all older browsers." It makes sense to make tags, even if they aren't necessary, so that developers can put tags in for older browsers (at least until the older browsers finally die). From dean.edwards at gmail.com Fri Oct 2 15:27:42 2009 From: dean.edwards at gmail.com (Dean Edwards) Date: Fri, 02 Oct 2009 23:27:42 +0100 Subject: [whatwg] Closing tags for empty content model In-Reply-To: <6E783D8AC32E47EC95AEDA28C081A17C@satech> References: <4AC0E448.3000304@gmail.com><45f4181c0909281918q48b56251hb6bfb375067b2971@mail.gmail.com><4AC185F3.9060309@gmail.com> <6E783D8AC32E47EC95AEDA28C081A17C@satech> Message-ID: <4AC67E5E.1020204@gmail.com> On 02/10/2009 23:19, Michael Kozakewich wrote: > From: "Anne van Kesteren" > Sent: Tuesday, September 29, 2009 4:21 AM >> The problem with allowing this is that >>

>> means >>

>> ... >> This does suck a little when introducing new void elements, but keeping >> the syntax consistent is worth it in my opinion. >> > > But , so it sounds like adding the > would be the more consistent method.
and can be kept > the way they are, because they aren't problems, and > tag when a source is specified. I believe that ended with something like, > "we can't take it out without ruining support in all older browsers." > > It makes sense to make tags, even if they > aren't necessary, so that developers can put tags in for older > browsers (at least until the older browsers finally die). > I was thinking of when I requested . They are at least consistent in that they provide a "src" attribute indicating pseudo-content. Can we allow and save legacy Opera browsers? Don't you work for Opera Anne? ;) -dean From dean.edwards at gmail.com Fri Oct 2 15:35:27 2009 From: dean.edwards at gmail.com (Dean Edwards) Date: Fri, 02 Oct 2009 23:35:27 +0100 Subject: [whatwg] The new content model for
breaks rendering in MSIE5-7 In-Reply-To: <4AC27447.1020208@keryx.se> References: <4AC20FE1.8000200@gmail.com> <4AC23C01.7030203@gmail.com> <4AC23F93.5040204@gmail.com> <4AC25234.7020303@keryx.se> <4AC25B1D.1050505@gmail.com> <4AC265C8.8020405@gmail.com> <4AC27447.1020208@keryx.se> Message-ID: <4AC6802F.3020306@gmail.com> On 29/09/2009 20:08, Dean Edwards wrote: > > You have two choices to get around the
rendering bug: > > 1. The potentially dangerous document.write() On 29/09/2009 18:10, Dean Edwards wrote: > > There is a nasty side effect though. As you mentioned the > document.write() should be the last thing in the . If there > are any scripts following the document.write() then they are *not > executed*. I consider this a serious drawback. > 2. Inserting weird conditional comments into your code: > > > I don't like either solution. On 29/09/2009 21:55, Keryx Web wrote: > 2009-09-29 21:53, Dean Edwards wrote: > >> Can't we just invent some new elements? We've already created 20 >> new ones. Two more won't hurt. :) > > This has been discussed on the HTML5 WG list to death. Can we revisit this? It seems to important to sweep under the carpet. -dean From jackalmage at gmail.com Fri Oct 2 15:51:55 2009 From: jackalmage at gmail.com (Tab Atkins Jr.) Date: Fri, 2 Oct 2009 17:51:55 -0500 Subject: [whatwg] The new content model for
breaks rendering in MSIE5-7 In-Reply-To: <4AC6802F.3020306@gmail.com> References: <4AC20FE1.8000200@gmail.com> <4AC23C01.7030203@gmail.com> <4AC23F93.5040204@gmail.com> <4AC25234.7020303@keryx.se> <4AC25B1D.1050505@gmail.com> <4AC265C8.8020405@gmail.com> <4AC27447.1020208@keryx.se> <4AC6802F.3020306@gmail.com> Message-ID: On Fri, Oct 2, 2009 at 5:35 PM, Dean Edwards wrote: > On 29/09/2009 21:55, Keryx Web wrote: >> 2009-09-29 21:53, Dean Edwards wrote: >>> Can't we just invent some new elements? We've already created 20 >>> new ones. Two more won't hurt. :) >> >> This has been discussed on the HTML5 WG list to death. > > Can we revisit this? It seems to important to sweep under the carpet. The basic issue is that the use-case for
and
are sorta minimal anyway - it's enough that they can justify themselves, but just barely. If we have to mint *more* new elements just to get them to work, that moves them from "barely worth the effort" to "meh, just drop it".
/
only have parsing problems in IE6 and IE7. Both of them *are*, finally, actually dropping off the radar. Windows 7 will accelerate this as people upgrade with an OS that runs IE8 by default. Give it 2 years or so and most places will be able to justify ignoring IE7 (many/most sites already ignore IE6). In the meantime, we can just keep using
s to handle both of these cases, like we do right now. ~TJ From dean.edwards at gmail.com Fri Oct 2 17:06:07 2009 From: dean.edwards at gmail.com (Dean Edwards) Date: Sat, 03 Oct 2009 01:06:07 +0100 Subject: [whatwg] The new content model for
breaks rendering in MSIE5-7 In-Reply-To: References: <4AC20FE1.8000200@gmail.com> <4AC23C01.7030203@gmail.com> <4AC23F93.5040204@gmail.com> <4AC25234.7020303@keryx.se> <4AC25B1D.1050505@gmail.com> <4AC265C8.8020405@gmail.com> <4AC27447.1020208@keryx.se> <4AC6802F.3020306@gmail.com> Message-ID: <4AC6956F.10202@gmail.com> On 02/10/2009 23:51, Tab Atkins Jr. wrote: > On Fri, Oct 2, 2009 at 5:35 PM, Dean Edwards wrote: >> On 29/09/2009 21:55, Keryx Web wrote: >>> 2009-09-29 21:53, Dean Edwards wrote: >>>> Can't we just invent some new elements? We've already created 20 >>>> new ones. Two more won't hurt. :) >>> >>> This has been discussed on the HTML5 WG list to death. >> >> Can we revisit this? It seems to important to sweep under the carpet. > > The basic issue is that the use-case for
and
are > sorta minimal anyway - it's enough that they can justify themselves, > but just barely. If we have to mint *more* new elements just to get > them to work, that moves them from "barely worth the effort" to "meh, > just drop it". If that's the way people feel then it is better to drop these elements rather than introduce potentially dangerous behaviours when using them. You say that the use cases are marginal but just as I started getting used to them I found an awesome way to use them. Now that I can't use them I feel less awesome. >
/
only have parsing problems in IE6 and IE7. Only 30% of browsers you say? > In the meantime, we can just keep using
s to handle both of these > cases, like we do right now. > So we drop two new elements for the sake of adding two more? -dean From brucel at opera.com Fri Oct 2 17:25:06 2009 From: brucel at opera.com (Bruce Lawson) Date: Sat, 03 Oct 2009 01:25:06 +0100 Subject: [whatwg] The new content model for
breaks rendering in MSIE5-7 In-Reply-To: References: <4AC20FE1.8000200@gmail.com> <4AC23C01.7030203@gmail.com> <4AC23F93.5040204@gmail.com> <4AC25234.7020303@keryx.se> <4AC25B1D.1050505@gmail.com> <4AC265C8.8020405@gmail.com> <4AC27447.1020208@keryx.se> <4AC6802F.3020306@gmail.com> Message-ID: On Fri, 02 Oct 2009 23:51:55 +0100, Tab Atkins Jr. wrote: > the use-case for
and
are > sorta minimal anyway - it's enough that they can justify themselves, > but just barely. Use case for figure is perhaps minimal. But details is hugely useful. It's an incredibly common thing to want to collapse and hide a section of explanatory text. -- Hang loose and stay groovy, Bruce Lawson Web Evangelist www.opera.com (work) www.brucelawson.co.uk (personal) www.twitter.com/brucel From shadow2531 at gmail.com Fri Oct 2 19:18:05 2009 From: shadow2531 at gmail.com (Michael A. Puls II) Date: Fri, 02 Oct 2009 22:18:05 -0400 Subject: [whatwg] Closing tags for empty content model In-Reply-To: <4AC67E5E.1020204@gmail.com> References: <4AC0E448.3000304@gmail.com> <45f4181c0909281918q48b56251hb6bfb375067b2971@mail.gmail.com> <4AC185F3.9060309@gmail.com> <6E783D8AC32E47EC95AEDA28C081A17C@satech> <4AC67E5E.1020204@gmail.com> Message-ID: On Fri, 02 Oct 2009 18:27:42 -0400, Dean Edwards wrote: > Can we allow and save legacy Opera browsers? Is there a reason to worry about legacy Opera browsers? On the desktop at least this shouldn't be an issue. There's very little stopping an upgrade to the latest and greatest. -- Michael From jackalmage at gmail.com Fri Oct 2 19:38:35 2009 From: jackalmage at gmail.com (Tab Atkins Jr.) Date: Fri, 2 Oct 2009 21:38:35 -0500 Subject: [whatwg] The new content model for
breaks rendering in MSIE5-7 In-Reply-To: References: <4AC20FE1.8000200@gmail.com> <4AC23F93.5040204@gmail.com> <4AC25234.7020303@keryx.se> <4AC25B1D.1050505@gmail.com> <4AC265C8.8020405@gmail.com> <4AC27447.1020208@keryx.se> <4AC6802F.3020306@gmail.com> Message-ID: On Fri, Oct 2, 2009 at 7:25 PM, Bruce Lawson wrote: > On Fri, 02 Oct 2009 23:51:55 +0100, Tab Atkins Jr. > wrote: > >> the use-case for
and
are >> sorta minimal anyway - it's enough that they can justify themselves, >> but just barely. > > Use case for figure is perhaps minimal. But details is hugely useful. It's > an incredibly common thing to want to collapse and hide a section of > explanatory text. Agreed, but
won't be usable at all in modern browsers (without hacking support in via js) until everyone updates. By the time
has native functionality it'll be safe to use
/
in it. For now we can just keep doing what we're already doing with javascript and do this with
s (or, as I often use,
s).
is actually worse off here, since it 'works' in modern browsers already (since it's nothing but a
with extra semantics). But, as you say, it's also much less useful in general terms than
will be. Staying with
for now won't be a big deal. ~TJ From darin at chromium.org Fri Oct 2 21:11:02 2009 From: darin at chromium.org (Darin Fisher) Date: Fri, 2 Oct 2009 21:11:02 -0700 Subject: [whatwg] Structured clone algorithm on LocalStorage In-Reply-To: <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> References: <5dd9e5c50909231335w4d7f6602n97ff0d638b2145a9@mail.gmail.com> <63df84f0909241040k322c232at8348bd65c3078e55@mail.gmail.com> <63df84f0909241643l5bf77908h325ba09ebd8fc678@mail.gmail.com> <63df84f0909242357p254b90f6i6f9df9266ea8138c@mail.gmail.com> <63df84f0909292348h21f51a30r208ea1cd25375686@mail.gmail.com> <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> Message-ID: On Fri, Oct 2, 2009 at 8:08 PM, Jonas Sicking wrote: > On Wed, Sep 30, 2009 at 10:11 PM, Darin Fisher wrote: > >> On Tue, Sep 29, 2009 at 11:48 PM, Jonas Sicking wrote: >> >>> On Tue, Sep 29, 2009 at 12:19 AM, Darin Fisher >>> wrote: >>> > On Thu, Sep 24, 2009 at 11:57 PM, Jonas Sicking >>> wrote: >>> >> >>> >> On Thu, Sep 24, 2009 at 9:04 PM, Darin Fisher >>> wrote: >>> >> > On Thu, Sep 24, 2009 at 4:43 PM, Jonas Sicking >>> wrote: >>> >> >> >>> >> >> On Thu, Sep 24, 2009 at 10:52 AM, Darin Fisher >> > >>> >> >> wrote: >>> >> >> > On Thu, Sep 24, 2009 at 10:40 AM, Jonas Sicking >> > >>> >> >> > wrote: >>> >> >> >> >>> >> >> >> On Thu, Sep 24, 2009 at 1:17 AM, Darin Fisher < >>> darin at chromium.org> >>> >> >> >> wrote: >>> >> >> >> > On Thu, Sep 24, 2009 at 12:20 AM, Jonas Sicking >>> >>> >> >> >> > wrote: >>> >> >> >> >> >>> >> >> >> >> On Wed, Sep 23, 2009 at 10:19 PM, Darin Fisher >>> >> >> >> >> >>> >> >> >> >> wrote: >>> > >>> > ... snip ... >>> > >>> >> >>> >> >> >> >> > multi-core is the future. what's the opposite of >>> fine-grained >>> >> >> >> >> > locking? >>> >> >> >> >> > it's not good ;-) >>> >> >> >> >> > the implicit locking mechanism as spec'd is super lame. >>> >> >> >> >> > implicitly >>> >> >> >> >> > unlocking under >>> >> >> >> >> > mysterious-to-the-developer circumstances! how can that be >>> a >>> >> >> >> >> > good >>> >> >> >> >> > thing? >>> >> >> >> >> > storage.setItem("y", >>> >> >> >> >> > >>> function_involving_implicit_unlocking(storage.getItem("x"))); >>> >> >> >> >> >>> >> >> >> >> I totally agree on all points. The current API has big >>> >> >> >> >> imperfections. >>> >> >> >> >> However I haven't seen any workable counter proposals so far, >>> and >>> >> >> >> >> I >>> >> >> >> >> honestly don't believe there are any as long as our goals >>> are: >>> >> >> >> >> >>> >> >> >> >> * Don't break existing users of the current implementations. >>> >> >> >> >> * Don't expose race conditions to the web. >>> >> >> >> >> * Don't rely on authors getting explicit locking mechanisms >>> >> >> >> >> right. >>> >> >> >> >> >>> >> >> >> > >>> >> >> >> > The current API exposes race conditions to the web. The >>> implicit >>> >> >> >> > dropping of the storage lock is that. In Chrome, we'll have >>> to >>> >> >> >> > drop >>> >> >> >> > an existing lock whenever a new lock is acquired. That can >>> happen >>> >> >> >> > due to a variety of really odd cases (usually related to >>> nested >>> >> >> >> > loops >>> >> >> >> > or nested JS execution), which will be difficult for >>> developers to >>> >> >> >> > predict, especially if they are relying on third-party JS >>> >> >> >> > libraries. >>> >> >> >> > This issue seems to be discounted for reasons I do not >>> understand. >>> >> >> >> >>> >> >> >> I don't believe we've heard about this before, so that would be >>> the >>> >> >> >> reason it hasn't been taken into account. >>> >> >> >> >>> >> >> >> So you're saying that chrome would be unable implement the >>> current >>> >> >> >> storage mutex as specified in spec? I.e. one that is only >>> released >>> >> >> >> at >>> >> >> >> the explicit points that the spec defines? That seems like a >>> huge >>> >> >> >> problem. >>> >> >> > >>> >> >> > No, no... my point is that to the application developer, those >>> >> >> > "explicit" >>> >> >> > points will appear quite implicit and mysterious. This is why I >>> >> >> > called >>> >> >> > out third-party JS libraries. One day, a function that you are >>> using >>> >> >> > might transition to scripting a plugin, which might cause a >>> nested >>> >> >> > loop, which could then force the lock to be released. As a >>> >> >> > programmer, >>> >> >> > the unlocking is not explicit or predictable. >>> >> >> >>> >> >> Ah, indeed, this is a problem. However the unfortunate fact remains >>> >> >> that so far no other workable solution has been proposed. >>> >> > >>> >> > OK, so we agree that the current solution doesn't meet the goals you >>> >> > stated above :-( >>> >> >>> >> Well, it addresses them as long as users are aware of the risk, and >>> >> properly document weather their various library functions will release >>> >> the lock or not. However I agree that it's unlikely that they will do >>> >> so correctly. >>> > >>> > I thought the point of not having lock APIs was that users shouldn't >>> have >>> > to understand locks ;-) The issue I've raised here is super subtle. >>> We >>> > have not succeeded in avoiding subtlety! >>> >>> I think we're mostly in agreement. What I'm not sure about is what you >>> are proposing we do with localStorage? Remove it from the spec? Change >>> the API? Something else? >>> >>> >> I'm glad we agree. >> >> I'm not sure what we should do. It seems like there is a "legacy API" >> argument for sticking with the current proposal even though it is flawed >> and >> HTML5 is not yet final. (It has also not been implemented by browsers for >> very long.) Stated that way, it sounds like a weak argument for >> preserving >> the API as is, and we should just fix it to be better. >> >> My understanding is that removal is not a popular position. However, >> given >> that more browsers are moving to be multi-process, I have to say that I'm >> a >> bit surprised there isn't more support for ditching the current >> localStorage >> API. >> > > You're preaching to the choir :) I'd recommend talking to apple and > microsoft directly. I don't know what their plans are regarding all this. > Fair enough :-) > > >> >> >>> >> >> > Moreover, there are other examples which have been discussed on >>> the >>> >> >> > list. There are some DOM operations that can result in a frame >>> >> >> > receiving >>> >> >> > a DOM event synchronously. That can result in a nesting of >>> storage >>> >> >> > locks, >>> >> >> > which can force us to have to implicitly unlock the outermost >>> lock to >>> >> >> > avoid >>> >> >> > deadlocks. Again, the programmer will have very poor visibility >>> into >>> >> >> > when >>> >> >> > these things can happen. >>> >> >> >>> >> >> So far I don't think it has been shown that these events need to be >>> >> >> synchronous. They all appear to be asynchronous in gecko, and in >>> the >>> >> >> case of different-origin frames, I'm not even sure there's a way >>> for >>> >> >> pages to detect if the event was fired asynchronously or not. >>> >> > >>> >> > IE and WebKit dispatch some of them synchronously. It's hard to say >>> >> > which >>> >> > is correct or if it causes any web compat isues. I'm also not sure >>> that >>> >> > we >>> >> > have covered all of the cases. >>> >> >>> >> It still seems to me that it's extremely unlikely that pages depend on >>> >> cross origin events to fire synchronously. I can't even think of a way >>> >> to test if a browser dispatches these events synchronously or not. Can >>> >> you? >>> > >>> > i agree that it seems uncommon. maybe there could be some odd app that >>> > does something after resizing an iframe that could be dependent on the >>> > event handler setting some data field. this kind of thing is probably >>> even >>> > less common in the cross-origin case. >>> >>> But how would you read that data field in the cross-origin frame? I >>> think it might be possible, but extremely hard. >>> >>> >> Yeah. >> >> My concern is simply that I cannot prove that I don't have to worry about >> this >> problem. Future web APIs might also inadvertently make matters worse. >> > > I agree it's not ideal, but at the same time I don't think that not > allowing synchronous cross-origin APIs is a huge burden. You campaigned > heavily against that when we were designing postMessage for wholly other > reasons. I would imagine those reasons will hole true no matter what. > Agreed. That's a good point. In that case, I was concerned about stack depth. The same issue might apply here. Hmm... ...snip... > >>> >> >> Not quite sure I follow your proposal. How would you for example >>> >> >> increase the value of a property by one without risking race >>> >> >> conditions? Or keep two values in different properties in sync? >>> I.e. >>> >> >> so that if you update one always update the other, so that they >>> never >>> >> >> have different values. >>> >> >> >>> >> >> / Jonas >>> >> > >>> >> > >>> >> > Easy. Just like with database, the transaction is the storage lock. >>> >> > Any >>> >> > storage >>> >> > operation performed on that transaction are done atomically. >>> However, >>> >> > all >>> >> > storage >>> >> > operations are asynchronous. You basically string together >>> asynchronous >>> >> > storage >>> >> > operations by using the same transaction for each. >>> >> > We could add methods to get/set multiple items at once to simplify >>> life >>> >> > for >>> >> > the coder. >>> >> >>> >> I think I still don't understand your proposal, could you give some >>> >> code examples? >>> >> >>> > >>> > >>> > ripping off database: >>> > interface ValueStorage { >>> > void transaction(in DOMString namespace, in >>> > ValueStorageTransactionCallback callback); >>> > }; >>> > interface ValueStorageTransactionCallback { >>> > void handleEvent(in ValueStorageTransaction transaction); >>> > }; >>> > interface ValueStorageTransaction { >>> > void readValue(in DOMString name, in ValueStorageReadCallback >>> callback); >>> > void writeValue(in DOMString name, in DOMString value); >>> > }; >>> > interface ValueStorageReadCallback { >>> > void handleEvent(in ValueStorageTransaction transaction, in DOMString >>> > value); >>> > }; >>> > then, to use these interfaces, you could implement thread-safe >>> increment: >>> > window.localStorage.transaction("slice", function(transaction) { >>> > transaction.readValue("foo", function(transaction, fooValue) { >>> > transaction.writeValue("foo", ++fooValue); >>> > }) >>> > }) >>> > to fetch multiple values, you could do this: >>> > var values = []; >>> > var numValues = 10; >>> > function readNextValue(transaction) { >>> > if (values.length == numValues) >>> > return; // done! >>> > var index = values.length; >>> > transaction.readValue("value" + index, function(transaction, value) { >>> > values.push(value); >>> > readNextValue(transaction); >>> > }) >>> > } >>> > window.localStorage.transaction("slice", readNextValue); >>> > This has the property that all IO is non-blocking and the "lock" is >>> held >>> > only >>> > for a very limited scope. The programmer is however free to extend the >>> > life of the lock as needed. >>> >>> What do you mean by that the "lock" is held for only a very limited >>> scope? You still want to prevent modifications for as long as the >>> transaction is being used right? I.e. no modifications can happen >>> between the read and the write in the first example, and between the >>> different reads in the second. >>> >> >> Yes. I only meant that the programmer doesn't have to call a special >> function to close the transaction. It closes by virtue of the last >> handleEvent >> call referring to the transaction returning. >> > > So wouldn't you implement this transaction using a lock? To prevent other > pages from accessing the localStorage? > > Yes, but it wouldn't need to be a normal mutex if that's what you mean. You could just defer callbacks until the transaction completes. It is purely asynchronous locking. -Darin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at sicking.cc Fri Oct 2 21:43:51 2009 From: jonas at sicking.cc (Jonas Sicking) Date: Fri, 2 Oct 2009 21:43:51 -0700 Subject: [whatwg] Structured clone algorithm on LocalStorage In-Reply-To: References: <5dd9e5c50909231335w4d7f6602n97ff0d638b2145a9@mail.gmail.com> <63df84f0909241643l5bf77908h325ba09ebd8fc678@mail.gmail.com> <63df84f0909242357p254b90f6i6f9df9266ea8138c@mail.gmail.com> <63df84f0909292348h21f51a30r208ea1cd25375686@mail.gmail.com> <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> Message-ID: <63df84f0910022143t51905a2as99f68bfe78e73704@mail.gmail.com> > > >> >> > Moreover, there are other examples which have been discussed on >>>> the >>>> >> >> > list. There are some DOM operations that can result in a frame >>>> >> >> > receiving >>>> >> >> > a DOM event synchronously. That can result in a nesting of >>>> storage >>>> >> >> > locks, >>>> >> >> > which can force us to have to implicitly unlock the outermost >>>> lock to >>>> >> >> > avoid >>>> >> >> > deadlocks. Again, the programmer will have very poor visibility >>>> into >>>> >> >> > when >>>> >> >> > these things can happen. >>>> >> >> >>>> >> >> So far I don't think it has been shown that these events need to >>>> be >>>> >> >> synchronous. They all appear to be asynchronous in gecko, and in >>>> the >>>> >> >> case of different-origin frames, I'm not even sure there's a way >>>> for >>>> >> >> pages to detect if the event was fired asynchronously or not. >>>> >> > >>>> >> > IE and WebKit dispatch some of them synchronously. It's hard to >>>> say >>>> >> > which >>>> >> > is correct or if it causes any web compat isues. I'm also not sure >>>> that >>>> >> > we >>>> >> > have covered all of the cases. >>>> >> >>>> >> It still seems to me that it's extremely unlikely that pages depend >>>> on >>>> >> cross origin events to fire synchronously. I can't even think of a >>>> way >>>> >> to test if a browser dispatches these events synchronously or not. >>>> Can >>>> >> you? >>>> > >>>> > i agree that it seems uncommon. maybe there could be some odd app >>>> that >>>> > does something after resizing an iframe that could be dependent on the >>>> > event handler setting some data field. this kind of thing is probably >>>> even >>>> > less common in the cross-origin case. >>>> >>>> But how would you read that data field in the cross-origin frame? I >>>> think it might be possible, but extremely hard. >>>> >>>> >>> Yeah. >>> >>> My concern is simply that I cannot prove that I don't have to worry about >>> this >>> problem. Future web APIs might also inadvertently make matters worse. >>> >> >> I agree it's not ideal, but at the same time I don't think that not >> allowing synchronous cross-origin APIs is a huge burden. You campaigned >> heavily against that when we were designing postMessage for wholly other >> reasons. I would imagine those reasons will hole true no matter what. >> > > Agreed. That's a good point. In that case, I was concerned about stack > depth. The same issue might apply here. Hmm... > As far as I can see it does. > > ...snip... > >> >>>> >> >> Not quite sure I follow your proposal. How would you for example >>>> >> >> increase the value of a property by one without risking race >>>> >> >> conditions? Or keep two values in different properties in sync? >>>> I.e. >>>> >> >> so that if you update one always update the other, so that they >>>> never >>>> >> >> have different values. >>>> >> >> >>>> >> >> / Jonas >>>> >> > >>>> >> > >>>> >> > Easy. Just like with database, the transaction is the storage >>>> lock. >>>> >> > Any >>>> >> > storage >>>> >> > operation performed on that transaction are done atomically. >>>> However, >>>> >> > all >>>> >> > storage >>>> >> > operations are asynchronous. You basically string together >>>> asynchronous >>>> >> > storage >>>> >> > operations by using the same transaction for each. >>>> >> > We could add methods to get/set multiple items at once to simplify >>>> life >>>> >> > for >>>> >> > the coder. >>>> >> >>>> >> I think I still don't understand your proposal, could you give some >>>> >> code examples? >>>> >> >>>> > >>>> > >>>> > ripping off database: >>>> > interface ValueStorage { >>>> > void transaction(in DOMString namespace, in >>>> > ValueStorageTransactionCallback callback); >>>> > }; >>>> > interface ValueStorageTransactionCallback { >>>> > void handleEvent(in ValueStorageTransaction transaction); >>>> > }; >>>> > interface ValueStorageTransaction { >>>> > void readValue(in DOMString name, in ValueStorageReadCallback >>>> callback); >>>> > void writeValue(in DOMString name, in DOMString value); >>>> > }; >>>> > interface ValueStorageReadCallback { >>>> > void handleEvent(in ValueStorageTransaction transaction, in >>>> DOMString >>>> > value); >>>> > }; >>>> > then, to use these interfaces, you could implement thread-safe >>>> increment: >>>> > window.localStorage.transaction("slice", function(transaction) { >>>> > transaction.readValue("foo", function(transaction, fooValue) { >>>> > transaction.writeValue("foo", ++fooValue); >>>> > }) >>>> > }) >>>> > to fetch multiple values, you could do this: >>>> > var values = []; >>>> > var numValues = 10; >>>> > function readNextValue(transaction) { >>>> > if (values.length == numValues) >>>> > return; // done! >>>> > var index = values.length; >>>> > transaction.readValue("value" + index, function(transaction, value) >>>> { >>>> > values.push(value); >>>> > readNextValue(transaction); >>>> > }) >>>> > } >>>> > window.localStorage.transaction("slice", readNextValue); >>>> > This has the property that all IO is non-blocking and the "lock" is >>>> held >>>> > only >>>> > for a very limited scope. The programmer is however free to extend >>>> the >>>> > life of the lock as needed. >>>> >>>> What do you mean by that the "lock" is held for only a very limited >>>> scope? You still want to prevent modifications for as long as the >>>> transaction is being used right? I.e. no modifications can happen >>>> between the read and the write in the first example, and between the >>>> different reads in the second. >>>> >>> >>> Yes. I only meant that the programmer doesn't have to call a special >>> function to close the transaction. It closes by virtue of the last >>> handleEvent >>> call referring to the transaction returning. >>> >> >> So wouldn't you implement this transaction using a lock? To prevent other >> pages from accessing the localStorage? >> >> > Yes, but it wouldn't need to be a normal mutex if that's what you mean. > You could just defer callbacks until the transaction completes. It is > purely asynchronous locking. > So how is that then different from from using a Storage API, but only letting you get a reference to the Storage object using a asynchronous API? And of course not allowing the Storage object to be stored in a variable and used outside the callback. / Jonas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at sicking.cc Fri Oct 2 21:47:51 2009 From: jonas at sicking.cc (Jonas Sicking) Date: Fri, 2 Oct 2009 21:47:51 -0700 Subject: [whatwg] Structured clone algorithm on LocalStorage In-Reply-To: References: <5dd9e5c50909231335w4d7f6602n97ff0d638b2145a9@mail.gmail.com> <63df84f0909241643l5bf77908h325ba09ebd8fc678@mail.gmail.com> <63df84f0909242357p254b90f6i6f9df9266ea8138c@mail.gmail.com> <63df84f0909292348h21f51a30r208ea1cd25375686@mail.gmail.com> <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> Message-ID: <63df84f0910022147q5616e152re91e1c655166d6b0@mail.gmail.com> On Fri, Oct 2, 2009 at 9:11 PM, Darin Fisher wrote: > >> It still seems to me that it's extremely unlikely that pages depend on >>>> >> cross origin events to fire synchronously. I can't even think of a >>>> way >>>> >> to test if a browser dispatches these events synchronously or not. >>>> Can >>>> >> you? >>>> > >>>> > i agree that it seems uncommon. maybe there could be some odd app >>>> that >>>> > does something after resizing an iframe that could be dependent on the >>>> > event handler setting some data field. this kind of thing is probably >>>> even >>>> > less common in the cross-origin case. >>>> >>>> But how would you read that data field in the cross-origin frame? I >>>> think it might be possible, but extremely hard. >>>> >>>> >>> Yeah. >>> >>> My concern is simply that I cannot prove that I don't have to worry about >>> this >>> problem. Future web APIs might also inadvertently make matters worse. >>> >> >> I agree it's not ideal, but at the same time I don't think that not >> allowing synchronous cross-origin APIs is a huge burden. You campaigned >> heavily against that when we were designing postMessage for wholly other >> reasons. I would imagine those reasons will hole true no matter what. >> > > Agreed. That's a good point. In that case, I was concerned about stack > depth. The same issue might apply here. Hmm... > As far as I can see it does. > > ripping off database: >>>> > interface ValueStorage { >>>> > void transaction(in DOMString namespace, in >>>> > ValueStorageTransactionCallback callback); >>>> > }; >>>> > interface ValueStorageTransactionCallback { >>>> > void handleEvent(in ValueStorageTransaction transaction); >>>> > }; >>>> > interface ValueStorageTransaction { >>>> > void readValue(in DOMString name, in ValueStorageReadCallback >>>> callback); >>>> > void writeValue(in DOMString name, in DOMString value); >>>> > }; >>>> > interface ValueStorageReadCallback { >>>> > void handleEvent(in ValueStorageTransaction transaction, in >>>> DOMString >>>> > value); >>>> > }; >>>> > then, to use these interfaces, you could implement thread-safe >>>> increment: >>>> > window.localStorage.transaction("slice", function(transaction) { >>>> > transaction.readValue("foo", function(transaction, fooValue) { >>>> > transaction.writeValue("foo", ++fooValue); >>>> > }) >>>> > }) >>>> > to fetch multiple values, you could do this: >>>> > var values = []; >>>> > var numValues = 10; >>>> > function readNextValue(transaction) { >>>> > if (values.length == numValues) >>>> > return; // done! >>>> > var index = values.length; >>>> > transaction.readValue("value" + index, function(transaction, value) >>>> { >>>> > values.push(value); >>>> > readNextValue(transaction); >>>> > }) >>>> > } >>>> > window.localStorage.transaction("slice", readNextValue); >>>> > This has the property that all IO is non-blocking and the "lock" is >>>> held >>>> > only >>>> > for a very limited scope. The programmer is however free to extend >>>> the >>>> > life of the lock as needed. >>>> >>>> What do you mean by that the "lock" is held for only a very limited >>>> scope? You still want to prevent modifications for as long as the >>>> transaction is being used right? I.e. no modifications can happen >>>> between the read and the write in the first example, and between the >>>> different reads in the second. >>>> >>> >>> Yes. I only meant that the programmer doesn't have to call a special >>> function to close the transaction. It closes by virtue of the last >>> handleEvent >>> call referring to the transaction returning. >>> >> >> So wouldn't you implement this transaction using a lock? To prevent other >> pages from accessing the localStorage? >> >> > Yes, but it wouldn't need to be a normal mutex if that's what you mean. > You could just defer callbacks until the transaction completes. It is > purely asynchronous locking. > So how is that then different from from using a Storage API, but only letting you get a reference to the Storage object using a asynchronous API? And of course not allowing the Storage object to be stored in a variable and used outside the callback. / Jonas -------------- next part -------------- An HTML attachment was scrubbed... URL: From darin at chromium.org Fri Oct 2 21:58:33 2009 From: darin at chromium.org (Darin Fisher) Date: Fri, 2 Oct 2009 21:58:33 -0700 Subject: [whatwg] Structured clone algorithm on LocalStorage In-Reply-To: <63df84f0910022143t51905a2as99f68bfe78e73704@mail.gmail.com> References: <5dd9e5c50909231335w4d7f6602n97ff0d638b2145a9@mail.gmail.com> <63df84f0909241643l5bf77908h325ba09ebd8fc678@mail.gmail.com> <63df84f0909242357p254b90f6i6f9df9266ea8138c@mail.gmail.com> <63df84f0909292348h21f51a30r208ea1cd25375686@mail.gmail.com> <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> <63df84f0910022143t51905a2as99f68bfe78e73704@mail.gmail.com> Message-ID: On Fri, Oct 2, 2009 at 9:43 PM, Jonas Sicking wrote: > >> >> > Moreover, there are other examples which have been discussed on >>>>> the >>>>> >> >> > list. There are some DOM operations that can result in a frame >>>>> >> >> > receiving >>>>> >> >> > a DOM event synchronously. That can result in a nesting of >>>>> storage >>>>> >> >> > locks, >>>>> >> >> > which can force us to have to implicitly unlock the outermost >>>>> lock to >>>>> >> >> > avoid >>>>> >> >> > deadlocks. Again, the programmer will have very poor >>>>> visibility into >>>>> >> >> > when >>>>> >> >> > these things can happen. >>>>> >> >> >>>>> >> >> So far I don't think it has been shown that these events need to >>>>> be >>>>> >> >> synchronous. They all appear to be asynchronous in gecko, and in >>>>> the >>>>> >> >> case of different-origin frames, I'm not even sure there's a way >>>>> for >>>>> >> >> pages to detect if the event was fired asynchronously or not. >>>>> >> > >>>>> >> > IE and WebKit dispatch some of them synchronously. It's hard to >>>>> say >>>>> >> > which >>>>> >> > is correct or if it causes any web compat isues. I'm also not >>>>> sure that >>>>> >> > we >>>>> >> > have covered all of the cases. >>>>> >> >>>>> >> It still seems to me that it's extremely unlikely that pages depend >>>>> on >>>>> >> cross origin events to fire synchronously. I can't even think of a >>>>> way >>>>> >> to test if a browser dispatches these events synchronously or not. >>>>> Can >>>>> >> you? >>>>> > >>>>> > i agree that it seems uncommon. maybe there could be some odd app >>>>> that >>>>> > does something after resizing an iframe that could be dependent on >>>>> the >>>>> > event handler setting some data field. this kind of thing is >>>>> probably even >>>>> > less common in the cross-origin case. >>>>> >>>>> But how would you read that data field in the cross-origin frame? I >>>>> think it might be possible, but extremely hard. >>>>> >>>>> >>>> Yeah. >>>> >>>> My concern is simply that I cannot prove that I don't have to worry >>>> about this >>>> problem. Future web APIs might also inadvertently make matters worse. >>>> >>> >>> I agree it's not ideal, but at the same time I don't think that not >>> allowing synchronous cross-origin APIs is a huge burden. You campaigned >>> heavily against that when we were designing postMessage for wholly other >>> reasons. I would imagine those reasons will hole true no matter what. >>> >> >> Agreed. That's a good point. In that case, I was concerned about stack >> depth. The same issue might apply here. Hmm... >> > > As far as I can see it does. > > > >> >> ...snip... >> >>> >>>>> >> >> Not quite sure I follow your proposal. How would you for example >>>>> >> >> increase the value of a property by one without risking race >>>>> >> >> conditions? Or keep two values in different properties in sync? >>>>> I.e. >>>>> >> >> so that if you update one always update the other, so that they >>>>> never >>>>> >> >> have different values. >>>>> >> >> >>>>> >> >> / Jonas >>>>> >> > >>>>> >> > >>>>> >> > Easy. Just like with database, the transaction is the storage >>>>> lock. >>>>> >> > Any >>>>> >> > storage >>>>> >> > operation performed on that transaction are done atomically. >>>>> However, >>>>> >> > all >>>>> >> > storage >>>>> >> > operations are asynchronous. You basically string together >>>>> asynchronous >>>>> >> > storage >>>>> >> > operations by using the same transaction for each. >>>>> >> > We could add methods to get/set multiple items at once to simplify >>>>> life >>>>> >> > for >>>>> >> > the coder. >>>>> >> >>>>> >> I think I still don't understand your proposal, could you give some >>>>> >> code examples? >>>>> >> >>>>> > >>>>> > >>>>> > ripping off database: >>>>> > interface ValueStorage { >>>>> > void transaction(in DOMString namespace, in >>>>> > ValueStorageTransactionCallback callback); >>>>> > }; >>>>> > interface ValueStorageTransactionCallback { >>>>> > void handleEvent(in ValueStorageTransaction transaction); >>>>> > }; >>>>> > interface ValueStorageTransaction { >>>>> > void readValue(in DOMString name, in ValueStorageReadCallback >>>>> callback); >>>>> > void writeValue(in DOMString name, in DOMString value); >>>>> > }; >>>>> > interface ValueStorageReadCallback { >>>>> > void handleEvent(in ValueStorageTransaction transaction, in >>>>> DOMString >>>>> > value); >>>>> > }; >>>>> > then, to use these interfaces, you could implement thread-safe >>>>> increment: >>>>> > window.localStorage.transaction("slice", function(transaction) { >>>>> > transaction.readValue("foo", function(transaction, fooValue) { >>>>> > transaction.writeValue("foo", ++fooValue); >>>>> > }) >>>>> > }) >>>>> > to fetch multiple values, you could do this: >>>>> > var values = []; >>>>> > var numValues = 10; >>>>> > function readNextValue(transaction) { >>>>> > if (values.length == numValues) >>>>> > return; // done! >>>>> > var index = values.length; >>>>> > transaction.readValue("value" + index, function(transaction, value) >>>>> { >>>>> > values.push(value); >>>>> > readNextValue(transaction); >>>>> > }) >>>>> > } >>>>> > window.localStorage.transaction("slice", readNextValue); >>>>> > This has the property that all IO is non-blocking and the "lock" is >>>>> held >>>>> > only >>>>> > for a very limited scope. The programmer is however free to extend >>>>> the >>>>> > life of the lock as needed. >>>>> >>>>> What do you mean by that the "lock" is held for only a very limited >>>>> scope? You still want to prevent modifications for as long as the >>>>> transaction is being used right? I.e. no modifications can happen >>>>> between the read and the write in the first example, and between the >>>>> different reads in the second. >>>>> >>>> >>>> Yes. I only meant that the programmer doesn't have to call a special >>>> function to close the transaction. It closes by virtue of the last >>>> handleEvent >>>> call referring to the transaction returning. >>>> >>> >>> So wouldn't you implement this transaction using a lock? To prevent other >>> pages from accessing the localStorage? >>> >>> >> Yes, but it wouldn't need to be a normal mutex if that's what you mean. >> You could just defer callbacks until the transaction completes. It is >> purely asynchronous locking. >> > > So how is that then different from from using a Storage API, but only > letting you get a reference to the Storage object using a asynchronous API? > And of course not allowing the Storage object to be stored in a variable and > used outside the callback. > > The difference is that storage IO is fully asynchronous in the API I proposed. It doesn't have to block the calling thread for reads. I think that is important. We should never design any APIs that involve synchronous IO (filesystem or network) from the main UI thread. -Darin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at sicking.cc Sat Oct 3 01:05:58 2009 From: jonas at sicking.cc (Jonas Sicking) Date: Sat, 3 Oct 2009 01:05:58 -0700 Subject: [whatwg] Structured clone algorithm on LocalStorage In-Reply-To: References: <5dd9e5c50909231335w4d7f6602n97ff0d638b2145a9@mail.gmail.com> <63df84f0909242357p254b90f6i6f9df9266ea8138c@mail.gmail.com> <63df84f0909292348h21f51a30r208ea1cd25375686@mail.gmail.com> <63df84f0910022008r79a6f76fiba16b99fab0053f4@mail.gmail.com> <63df84f0910022143t51905a2as99f68bfe78e73704@mail.gmail.com> Message-ID: <63df84f0910030105y64042ac8y556ce4031205234c@mail.gmail.com> On Fri, Oct 2, 2009 at 9:58 PM, Darin Fisher wrote: > >> >> Not quite sure I follow your proposal. How would you for example >>>>>> >> >> increase the value of a property by one without risking race >>>>>> >> >> conditions? Or keep two values in different properties in sync? >>>>>> I.e. >>>>>> >> >> so that if you update one always update the other, so that they >>>>>> never >>>>>> >> >> have different values. >>>>>> >> >> >>>>>> >> >> / Jonas >>>>>> >> > >>>>>> >> > >>>>>> >> > Easy. Just like with database, the transaction is the storage >>>>>> lock. >>>>>> >> > Any >>>>>> >> > storage >>>>>> >> > operation performed on that transaction are done atomically. >>>>>> However, >>>>>> >> > all >>>>>> >> > storage >>>>>> >> > operations are asynchronous. You basically string together >>>>>> asynchronous >>>>>> >> > storage >>>>>> >> > operations by using the same transaction for each. >>>>>> >> > We could add methods to get/set multiple items at once to >>>>>> simplify life >>>>>> >> > for >>>>>> >> > the coder. >>>>>> >> >>>>>> >> I think I still don't understand your proposal, could you give some >>>>>> >> code examples? >>>>>> >> >>>>>> > >>>>>> > >>>>>> > ripping off database: >>>>>> > interface ValueStorage { >>>>>> > void transaction(in DOMString namespace, in >>>>>> > ValueStorageTransactionCallback callback); >>>>>> > }; >>>>>> > interface ValueStorageTransactionCallback { >>>>>> > void handleEvent(in ValueStorageTransaction transaction); >>>>>> > }; >>>>>> > interface ValueStorageTransaction { >>>>>> > void readValue(in DOMString name, in ValueStorageReadCallback >>>>>> callback); >>>>>> > void writeValue(in DOMString name, in DOMString value); >>>>>> > }; >>>>>> > interface ValueStorageReadCallback { >>>>>> > void handleEvent(in ValueStorageTransaction transaction, in >>>>>> DOMString >>>>>> > value); >>>>>> > }; >>>>>> > then, to use these interfaces, you could implement thread-safe >>>>>> increment: >>>>>> > window.localStorage.transaction("slice", function(transaction) { >>>>>> > transaction.readValue("foo", function(transaction, fooValue) { >>>>>> > transaction.writeValue("foo", ++fooValue); >>>>>> > }) >>>>>> > }) >>>>>> > to fetch multiple values, you could do this: >>>>>> > var values = []; >>>>>> > var numValues = 10; >>>>>> > function readNextValue(transaction) { >>>>>> > if (values.length == numValues) >>>>>> > return; // done! >>>>>> > var index = values.length; >>>>>> > transaction.readValue("value" + index, function(transaction, >>>>>> value) { >>>>>> > values.push(value); >>>>>> > readNextValue(transaction); >>>>>> > }) >>>>>> > } >>>>>> > window.localStorage.transaction("slice", readNextValue); >>>>>> > This has the property that all IO is non-blocking and the "lock" is >>>>>> held >>>>>> > only >>>>>> > for a very limited scope. The programmer is however free to extend >>>>>> the >>>>>> > life of the lock as needed. >>>>>> >>>>>> What do you mean by that the "lock" is held for only a very limited >>>>>> scope? You still want to prevent modifications for as long as the >>>>>> transaction is being used right? I.e. no modifications can happen >>>>>> between the read and the write in the first example, and between the >>>>>> different reads in the second. >>>>>> >>>>> >>>>> Yes. I only meant that the programmer doesn't have to call a special >>>>> function to close the transaction. It closes by virtue of the last >>>>> handleEvent >>>>> call referring to the transaction returning. >>>>> >>>> >>>> So wouldn't you implement this transaction using a lock? To prevent >>>> other pages from accessing the localStorage? >>>> >>>> >>> Yes, but it wouldn't need to be a normal mutex if that's what you mean. >>> You could just defer callbacks until the transaction completes. It is >>> purely asynchronous locking. >>> >> >> So how is that then different from from using a Storage API, but only >> letting you get a reference to the Storage object using a asynchronous API? >> And of course not allowing the Storage object to be stored in a variable and >> used outside the callback. >> > > The difference is that storage IO is fully asynchronous in the API I > proposed. It doesn't have to block the calling thread for reads. I think > that is important. > > We should never design any APIs that involve synchronous IO (filesystem or > network) from the main UI thread. > Ah, that's a different problem from what I thought you talked about initially. I wasn't part of the initial design-phase of this API. But as I understand it, the idea was that it's expected that people will store small enough amounts of information in localStorage that the database can be kept in memory. Behind the scenes you can always write to disc asynchronously in order to reduce risk of dataloss in case of crash. I'm not sure if this is practical or not. I suspect that many times it won't be. However even here a asynchronous getter would help since you can read in the full database into memory at that point. / Jonas -------------- next part -------------- An HTML attachment was scrubbed... URL: From whatwg.org at boblet.net Sat Oct 3 01:26:38 2009 From: whatwg.org at boblet.net (Oli Studholme) Date: Sat, 3 Oct 2009 17:26:38 +0900 Subject: [whatwg]
functionality absorbed into
? Message-ID: Hi All, In talking with authors about HTML5
[1] I?ve found it seems confusing for many people, and I?ve also found it a little difficult to explain so it?s easy to understand (conversation = why? outline algorithm. huh?). Currently it?s only role is to hide subheadings from the outline algorithm and it doesn?t map to a common use pattern for adding semantic meaning. There doesn?t seem to be any tangible benefit to authors in using it. Superfriends suggested a Boolean attribute for
to determine if all child

-

elements are included in the outline[2]. The current
model excludes all subtitles from the outline. Assuming that subtitles should not be included in the outline (eg to make sure the highest-ranked title is indeed descriptive), what if
by default masked subtitles from the outline algorithm as
currently does? This would mean
is no longer necessary, and make
less optional (it currently feels like solely a CSS hook from an author perspective). Currently #the-header-element[3] mentions a ?Little Green Guys With Guns? example in which

-

elements in the
but outside
create implied
elements via the outline algorithm. If
hides all but one

-

element this won?t happen (this is also a potential issue with the Boolean attribute idea). While the spec states authors should add wrapping
s I suspect many won?t bother and rely on implied ones (unless they need CSS hooks). This would also be potentially confusing compared with