freenode :: #whatwg

8 Aug 2017
06:34annevkdomfarolino: that's cool, enjoy whatever else meanwhile
06:34annevkTabAtkins: Unicode and fragments is a bit of a hassle still
06:35annevkTabAtkins: probably best avoided, though it'll probably work
07:32DomenicTabAtkins: so FYI Watti seems to have a global table of IDs that it uses for deduping; then it can just use numeric suffixes. That seems less error-prone than your strategy?
07:32Domenicwanderview: JakeA: it sounds like you did figure out the idea. Which is that byte streams allow more transferring optimizations. (Even with non-BYOB readers.)
07:33Domenicannevk: that guidance seems good, although an example (perhaps the RIC one genericized) would help drive it home. People do seem to really like stack inspection sometimes, instead of explicit parameter passing.
07:34JakeADomenic: together we got there!
07:35DomenicI should spend more time on streams stuff.....
13:26wanderviewDomenic: no, no... let us catch up first
13:52tobieWhat are examples of interfaces that declare a named property getter but not an indexed property getter?
13:54annevktobie: Storage
13:54annevktobie: DOMStringMap
13:54tobieannevk: ta
14:29JakeAwanderview: I wasn't aware Firefox had double keying
14:29JakeASimilar to the Safari thing?
14:29wanderviewJakeA: its behind a pref and called something else I think... I believe we imported it from tor project
14:29JakeAexciting though!
14:30wanderviewJakeA: but our containers work in a similar way... add some private data to the origin and its extra unique, etc
14:31wanderviewJakeA: looks like privacy.firstparty.isolate
14:32wanderviewJakeA: we may not have things like "visiting a site as first party exempts it from double-keying" like safari, though
14:33wanderviewI haven't tried it
14:37DomenicWe are looking into something similar to that ("origin attributes" is what it's called I believe) especially to underlie things like suborigins
14:38annevkDomenic: that's what Firefox has and some folks at Chrome want to copy
14:38wanderviewDomenic: we also call it OriginAttributes :-)
14:38DomenicYeah it's based on a paper some FF folks wrote I believe
14:39wanderviewah, cool
14:39wanderviewis a "paper" like a blog?
14:39tobieannevk: in you mention enum order is defined by underlying infra list. Are all APIs with named props specified with an underlying infra list?
14:40annevktobie: pretty sure that's a no
14:41annevktobie: I do think order is defined though typically
14:41annevktobie: and when it's not that's a bug
14:41annevktobie: and not using Infra list a minor bug that'd be nice to fix
14:42tobieannevk: shouldn't WebIDL call that out somehow, though? Or maybe infra's for each should?
14:43annevktobie: it's called out by requiring it to be a list, which are ordered by definition
14:47tobieannevk: Oh! It had somehow never really clicked that while "while" was defined in 3.3 Iteration "for each" was just a reference to list/for each.
14:49tobieannevk: I guess that makes sense and will even more obvious as infra becomes ubiquitous.
14:54DomenicAnyone else have opinions on ?
17:15TabAtkins@annevk What's troublesome about unicode in fragments? They seem to work just fine. (I had to implement my own fragment-escaper, as Python2's urllib escaper doesn't understand unicode, but I did so by consulting HTML, so it should be correct.)
17:15refackHello all, has there been any work (or interest) in standardizing `'assert'`? It's been bugging me, and I see it is used in the platform tests
17:16TabAtkins@Domenic Yeah, I have the same, it isn't a matter of a *practical* trouble in deduping, just that it can make the refs a little ambiguous to read when you have terms with a numeric suffix. Purely aesthetic.
17:21annevkTabAtkins: URL parser may or may not escape it if you put it in raw
17:21annevkrefack: in JavaScript you mean?
17:21TabAtkinsI'm exactly following what HTML says is the valid charset for fragments, and %-escaping the rest.
17:22TabAtkinsIf URL and HTML differ, obviously one of them should be fixed. ^_^
17:22annevkI've no idea what HTML says :-)
17:22refackannevk: yes, specifically node's (or CommonJS)
17:22tobierefack: I don't think that's the same assert. ;)
17:23TabAtkinsannevk: Ah, I didn't even realize the HTML links sent me over to URL anyway ^_^
17:23refackNot the "Assert" in the docs, the `require('assert') in the tests
17:23annevkrefack: anyway, I know of no such efforts
17:23TabAtkins(I *was* wondering when HTML got syntax highlighting...)
17:24tobiethis throws in FF: (function() { "use strict"; document.createElement("div").attributes["3"] = 123 })();
17:24annevkTabAtkins: anyway, if it works it's fine, since we can't break that, I just know there's a couple of minor issues and browser differences left, but they might not get exposed when simply navigating
17:24tobieBut not this: document.createElement("div").attributes["3"] = 123;
17:25tobieIs this a known issue?
17:26annevktobie: haven't seen that discussed before
17:26annevktobie: typically IDL doesn't care about strict mode
17:26refackIf I volunteer, is there interest? I know only `node` has an implementation, but it is used by the test e.g.
17:27refackIt is sort of arbitrary, and definatly not rigorous
17:27tobieannevk: what do you mean by "typically IDL doesn't care about strict mode"
17:27annevktobie: no different code path gets taken
17:28annevkrefack: since it's a JavaScript extension I suspect #tc39 or es-discuss is a better place to ask
17:28tobieannevk: right, so these two things code snippets should not behave differently.
17:29tobies/things //
17:29annevkrefack: if there's some interest and someone is willing to present your proposal to the committee thingie they got going on you can write a proposal along the lines of the others:
17:29annevktobie: yeah, but maybe this is a weird case where the two worlds intersect? bit out of my depth
17:30annevktobie: hmm, there is some stuff that behaves differently based on strict mode:
17:30annevktobie: this might just be one of those
17:30refackthanks, my intuition was that WHATWG would be easier, but I get what you are saying
17:31annevkrefack: if you want it as an extension of the Console API you could do it through WHATWG
17:31annevkrefack: not really sure we have a home for a generic assert library
17:32annevkrefack: (and I'm also not entirely sure we need one, but that's a different discussion)
17:32tobieannevk: right, it didn't seem like NamedNodeMap was one of those, though.
17:32refackThat was my lead, but I see how tc39 should be my first attempt. I agree it not an eco-system interop issue (yet)
17:35annevktobie: I suspect it is looking at the algorithms
17:37annevktobie: if there's no setter for a property you end up throwing in strict mode
17:38annevktobie: that's what I think is happening
17:38annevktobie: and there's no setter since NamedNodeMap only defines a getter
17:42tobieannevk: where is that defined, though? I thought this was only for readonly attributes not all properties?
17:46annevktobie: it's no different from a readonly attribute afaict
17:46annevktobie: a readonly attribute is a property with a getter and an undefined setter
17:46annevktobie: this is no different
17:46annevktobie: back tomorrow
17:46tobieannevk: night
18:09tobieannevk: OK, I got it now. You're right. And this has been fixed in chrome canary too.
18:49Domenictobie: annevk: in general returning "false "from various meta-object protocol operations will throw in strict and no-op in sloppy. So this is pretty widespread even if it's not obviously so.
18:49Domenicrefack: those console tests are kind of old and maybe should be removed; the canonical ones are at
18:50DomenicNote how they are nicely written in .any.js format so you can run them easily in Node :)
18:52refackDomenic: where's the harness? I'd like to take inspiration from it.
18:52Domenicrefack: well Node has an implementation at
18:54refackboo that uses require('assert')... I want to make 'assert' better
18:55DomenicOh well I kind of doubt Node will want to change its assert module much
18:55DomenicBut there's
18:56DomenicI'm not sure it's super-great code tbh
18:56tobieDomenic: right.
18:56tobieDomenic: looking at
18:57tobieDomenic: shouldn't that be a no-op by virtue of NamedNodeMap not having a named prop setter?
18:58Domenictobie: doesn't it fall through to step 3?
18:59Domenicthen it goes to step 2...
19:00tobieIt falls through to step 2, first
19:00Domenicstep 2 is just LegacyPlatformObjectGetOwnProperty right?
19:00DomenicI think it is a no-op because we end up in step 2.2
19:01Domenicwait no
19:01tobieRight, so it comes back with a desc object that has writable as false, no?
19:01Domenicit is not a no-op because we reach 2.2, but the condition is not met, so we go on to stop 3 + 4
19:02Domeniccorrect, writable = false
19:02Domenicso it will *throw*
19:02tobiein strict
19:02tobieand no-op elsewhere
19:02Domenicwhich is what this test is
19:02tobieSo going back to the test
19:03tobieownProp should not show up in Reflect.ownKeys
19:03DomenicI agree
19:03DomenicAlthough the fact I stumbled through several different outcomes implies my judgment might be suspect
19:04tobiewell, fwiw, both FF and Chrome Canary throw in that case for indexed prop in strict mode.
19:05DomenicThat's good at least :)
19:05tobiehaven't tested beyond, yet.
19:05DomenicThis is good stuff in general
19:05DomenicTimothyGu remains amazing
19:05DomenicAnd thanks for backing him up with more testing work
19:05Domenicslash fact-checking
19:06tobieyes, it's really great to see people coming in with super solid PRs like this.
19:06DomenicI think the Bikeshed conversion can take some credit
19:07refackDomenic: thanks
19:07tobieI was about to say so
19:07TabAtkinsYeah, the old webidl was *so damn hard* to edit.
19:07TabAtkinsMoving to any modern processor would have improved that.
19:39tobieDomenic: so I think I made an error earlier
19:39tobieDomenic: in
19:40tobieStep 2 has last argument of LegacyPlatformObjectGetOwnProperty see to true
19:41tobieDomenic: which means that we fall through to 3 in LegacyPlatformObjectGetOwnProperty
19:41tobieDomenic: (As ignoreNamedProps is true)
19:43* tobie grumbles something about using ignoreNamedProps as a name for a boolean
19:57tobieDomenic: documented those here:
20:02tobieDomenic: and here:
21:12edsuhi all, i&#39;d be curious about anyone&#39;s feedback on this proposal to allow rel=bookmark to be used with <link>
9 Aug 2017
No messages
Last message: 14 days and 22 hours ago