2022-12-01 [23:54:25.0487] FYI regarding earlier discussion: https://github.com/orgs/mdn/discussions/242#discussioncomment-4274011 (TL;DR: MDN continuing to use Prettier without forking it.) [00:07:25.0825] > The google style guides are almost an antithesis of what we are teaching at MDN. o_O [01:25:36.0988] https://stackoverflow.com/questions/74638920/iframe-issue-javascript-alert-dialog-block-from-parent-when-added-permissions-p [01:29:54.0177] https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array is probably worth an answer from somebody familiar, with details on its history (from somebody familiar with its history) I don’t know enough to answer well there. I guess `DOMStringList` started out as something used in `window.location`… for some reason, and then it got used with IndexedDB… for some reason — but then not used anywhere else, and won’t be, because `sequence` is the thing to use instead? [01:30:21.0518] * https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array is probably worth an answer from somebody familiar with `DOMStringList`, with details on its history (from somebody familiar with its history) I don’t know enough to answer well there. I guess `DOMStringList` started out as something used in `window.location`… for some reason, and then it got used with IndexedDB… for some reason — but then not used anywhere else, and won’t be, because `sequence` is the thing to use instead? [01:30:33.0486] * https://stackoverflow.com/questions/74630989/why-use-domstringlist-rather-than-an-array is probably worth an answer from somebody familiar with `DOMStringList` — and answer with details on its history (from somebody familiar with its history) I don’t know enough to answer well there. I guess `DOMStringList` started out as something used in `window.location`… for some reason, and then it got used with IndexedDB… for some reason — but then not used anywhere else, and won’t be, because `sequence` is the thing to use instead? [03:28:43.0034] Answered. That was a fun one. [03:34:12.0773] > <@domenicdenicola:matrix.org> Answered. That was a fun one. wow yeah, really great answer — thanks much [03:41:50.0430] By the way, https://w3c.github.io/stackoverflow/ is a dashboard thing I put together recently — for daily review of Stack Overflow Q&As for web-platform features (in part as a way to help get a better understanding of which web-platform features developers are actually using, and what their common pain points are) It is just a set of links to some tag-based searches. If you mouse over the names of the feature sets like **Core** and **Graphics+typography**, it’ll show you which tags it’s searching on. Or else if you just follow the links, the search-results pages all also show which tags the results are for. [03:43:35.0068] Oh, fun! [08:41:17.0843] annevk: re https://github.com/whatwg/fetch/pull/1520#discussion_r1037244005 do you have an example of a case where a internal model is specified? [12:32:19.0260] annevk: I'm trying to figure out how to say "if a URL's fragment is an ID reference" (rather than a Media Fragment, or one of those SVG fragment functions, or the like). Any opinions on how to phrase this? [12:32:30.0949] (I just need to carve out those other cases as Explicitly Undefined right now.) [12:35:52.0876] possibly the answer is to just not do that, and instead just unreservedly attempt to find an element with the given ID, and if it fails, handle the failure generically. [12:36:04.0241] (context: i'm cleaning up the spec text for https://github.com/w3c/csswg-drafts/issues/3320) [13:01:21.0391] TabAtkins: perhaps HTML's fragment navigation thingie needs an abstraction, but that's where I'd look [13:02:19.0052] I'm end-running around the thing, since I need to handle "can't find the ID" the same way as "isn't an ID ref at all" anyway [13:02:30.0829] https://html.spec.whatwg.org/#the-indicated-part-of-the-document [13:02:58.0812] dlrobertson: Headers/Response/Request all do it pretty well I think [13:03:14.0762] 👍️ thanks I'll take a look [13:03:37.0133] (really most WHATWG documents are good at separating private from public API) [13:07:45.0788] annevk: Hm, the "find a potential indicated element" is what I'm reproducing manually right now, so it would be nice to use it, but the algo specifies its "root" argument as a Document, not Document or ShadowRoot [13:08:02.0436] Well, I'm not doing the a-name resolution, but I could take or leave that [13:14:20.0014] It should be possible to generalize to allow for another caller (while at the same time maybe constraining the name attribute stuff) [13:14:27.0848] Gotta go for the day [13:14:37.0472] kk, i'll raise an issue. thanks for the help! 2022-12-02 [22:35:58.0269] Would this be the first time WTF-16 is referenced as a public API name in a programming language? https://github.com/WebAssembly/stringref/blob/main/proposals/stringref/Overview.md [22:36:06.0299] `string.new_wtf8` etc. [23:36:27.0587] Domenic: oh my. Is this on top of the previous "let's use UTF-8" or this some new iteration of that? [23:47:54.0568] /me files https://github.com/WebAssembly/stringref/issues/54 [00:05:30.0090] It seems like it's... separate? The previous thing was about the component model, which I think is about boundaries? Whereas this is about adding WTF-8/16 strings to WebAssembly itself? [00:10:09.0116] I looked through the issues and they're even considering WTF-8 literals (which goes against Simon's spec)... I hope this is not a thing that has wide buy-in. [00:15:36.0446] Well, I think now is the time to give feedback through your local wasm committee member... I decided this was pretty low-level and mostly language-ey and not web platform-ey so I didn't have very strong opinions. [00:16:04.0328] That is, it seems icky to introduce WTF-* strings into a new programming language in this day and age, but wasm isn't really a new programming language anyway, it's a compile target for old ones, so... [00:20:54.0317] Domenic: yeah I filed an issue and pinged someone internally. I personally see Wasm as more than just a compile target. At least I'd like them to be more ambitious than that. [00:21:50.0017] I also don't understand the zero-copy requirement. Given the myriad of JS string types JS engines have, that seems improbable. [00:22:26.0987] I think there's only generally two types, strings and ropes. Presumably ropes need to be flattened, but basic strings wouldn't. [00:22:54.0044] Hmm, although there's also the 8-bit latin1 vs. 16-bit distinction [00:23:46.0044] Right, I think in Gecko it ended up at 16 variants total at one point, but maybe that changed [00:24:40.0591] I would expect Andy Wingo to know that though, so not sure what's up [01:09:58.0560] annevk: What's the use case for an external spec being able to set _beStrict_ to true here https://url.spec.whatwg.org/#idna ? What external spec sets it to true? [01:26:09.0628] hsivonen: it's not meant for an external spec, it's meant for https://url.spec.whatwg.org/#valid-domain [01:26:36.0540] hsivonen: no external spec can call those algorithms, they have to go through the host parser [01:28:30.0735] > <@annevk:matrix.org> hsivonen: no external spec can call those algorithms, they have to go through the host parser That _beStrict_ didn't occur in the caller part of the spec confused me [01:29:27.0326] Positional arguments vs. keyword arguments in specs... [01:29:54.0187] hsivonen: I could probably remove the default, I'm not even sure why I gave it one [01:30:55.0849] Anyway, it looks like I need to support setting UseSTD3ASCIIRules both ways, but I don't need to support transitional processing. [01:33:18.0588] hsivonen: I'll make that change and I'll also add beStrict to domain to Unicode for the same reason (URL has 2 callers for Unicode ToUnicode at the moment) [01:34:21.0073] > <@annevk:matrix.org> hsivonen: I'll make that change and I'll also add beStrict to domain to Unicode for the same reason (URL has 2 callers for Unicode ToUnicode at the moment) Thanks. Aside: It's super confusing what the level of operation reuse in ToASCII and ToUnicode is. It turns out that Gecko uses ICU4C's ToUnicode operation as the back end for both! [01:35:05.0051] Domenic: could you review https://github.com/whatwg/url/pull/717 and https://github.com/whatwg/url/pull/719? [01:35:35.0676] Will do, although maybe not until next week. [01:36:51.0022] hsivonen: hopefully it being part of Interop 2022 (and likely 2023) will make IDNA handling a bit more understood and worked upon, but it's been rather frustrating trying to make progress on it [01:37:09.0208] I note that the URL Standard at least hard-codes three of the flags: CheckHyphens set to false, CheckBidi set to true, CheckJoiners set to true. Now I'm curious about the history of those being flags in UTS 46. [01:37:26.0664] hsivonen: including with people deciding out-of-band that non-transitional is suddenly okay without much coordination across browsers and such, very weird [01:38:20.0248] hsivonen: right yeah this doesn't make sense as an end state to me, UTS 46 can and should probably simplify [01:39:15.0229] (and then Chromium advertising this as an IDNA2008 thing which UTS 46 does rather specific things with is also concerning, but hopefully it'll all work out) [01:40:06.0302] (Context: https://github.com/unicode-org/icu4x/issues/2850 ) [01:49:14.0585] hsivonen: you want to review https://github.com/whatwg/url/pull/720? [01:53:15.0664] Thanks! [02:19:44.0790] > * <@annevk:matrix.org> files https://github.com/WebAssembly/stringref/issues/54 Thanks. Fwiw, Andy is out for the next few months, and I doubt we'll make significant changes before he returns 2022-12-07 [01:41:30.0312] Hello, I don't know if the question belongs here, but I was currently involved in a design question like https://discourse.wicg.io/t/waituntil-on-dom-events/2056 and was curious for the possible answer (see http://discourse.wicg.io/t/waituntil-on-dom-events/2056/3). Anyone? [02:38:17.0829] I think the comment right after the one you linked is the answer. [04:34:05.0286] > <@domenicdenicola:matrix.org> I think the comment right after the one you linked is the answer. Thanks for the answer. But then I was wondering why ExtendableEvent (from the ServiceWorker API) does support async dispatching with the same API? [04:34:38.0515] It doesn't support async dispatching. It supports giving a promise to the browser which tells it not to shut down the service worker until the promise is done. [04:34:46.0608] That promise doesn't extent event dispatch in any way [04:34:53.0978] (E.g. you cannot cancel the event asynchronously) [04:35:10.0482] ah ok [04:35:13.0293] interesting [04:36:02.0191] I had to review some code and a colleage implemented something like: https://github.com/rektide/async-event-target [04:37:02.0406] For some reason this doesn't seem right and I was wondering why this would be the case, but although it "feels" wrong I can't seem to find the good arguments not to do so [04:40:06.0241] the comment here http://discourse.wicg.io/t/waituntil-on-dom-events/2056/3 also says: "That requires way too much changes", not that's it's not possible or not a valid use case? [04:40:19.0735] we could also chat in private is this is not the place to discuss this here [04:41:50.0403] It seems fine to create your own thing if you have no other way of solving the problem. The platform doesn't provide it, and we definitely can't change every EventTarget on the platform to provide it. [04:42:15.0976] Heading to bed now myself, but others might have thoughts :) [04:42:55.0098] thanks! [05:02:18.0685] mek: https://github.com/whatwg/fs/pull/78 2022-12-08 [08:29:24.0804] While getting groceries I realized that `Response.error()` prolly exists for service workers. If they return one, do you get a rejected fetch? [09:46:26.0347] Jake Archibald: so based on `error_response` in WPT `service-workers/` it seems like there is some expectation that `Response.error()` is not turned into an exception similar to a network error. At least I think the cache test tries to store and retrieve it as-is. [09:54:06.0293] It does seem that responding with `Response.error()` from a service worker is treated as a network error, nice. 2022-12-09 [00:33:48.0890] annevk: are you saying that Chrome's implementation is doing the right thing (`Response.error()` returned from the service worker results in a failed fetch), but some tests suggest it should do something different? [00:44:09.0463] Jake Archibald: I think the main oddity I found is that you can store it in the Cache API [00:44:31.0792] Jake Archibald: which both does and does not make sense, so I guess it's okay [00:50:55.0958] annevk: hmm yeah, I see what you mean. I guess it's fine. The only way to get one of those errors is `Response.error()` right? [01:00:30.0400] Jake Archibald: yes [01:01:10.0612] yeah, it's fine I think. Having errors end up in the cache unintentionally might be an issue. [01:01:21.0675] But it seems like it has to be pretty intentional now [03:35:09.0674] Weird, I'm suddenly getting `hgroup` errors again for whatwg/url PRs [03:36:21.0670] As far as I can tell bikeshed-boilerplate and bikeshed-data are both good. TabAtkins is api.csswg.org known to sometimes use an old version or some such? [03:36:48.0148] sideshowbarker did something change in the validator perhaps? [03:40:11.0776] Also weird, PR Preview still has an `h2` in the `hgroup`. I guess it uses some other kind of template? [03:49:29.0741] Hmm, seems to have been some kind of fluke? Builds are passing again. Very weird. [03:57:24.0458] > <@annevk:matrix.org> sideshowbarker did something change in the validator perhaps? Not sure. We did recently update the checker to align with the current spec. But that was weeks ago, and nothing since then [03:59:58.0532] Yeah, looks like it was an api.csswg.org fluke of some sort. [04:00:01.0618] Thanks! [04:45:10.0041] It might be because the PRs are not rebased on main [04:51:36.0316] Domenic: that would not explain it failing first and later passing without changes to the PR [04:52:36.0397] If you're curious you can look at the two commits of https://github.com/whatwg/url/pull/722. First one still has its failing result. The second also failed, but I ran CI again. 2022-12-11 [04:37:06.0847] howdy folks! I'm working on implementing on top of fetch primitives, and I've hit a problem: [04:37:29.0634] fast-forwarding through all the setup and most of fetch itself, once we get to `fully read` (https://fetch.spec.whatwg.org/#body-fully-read) step 5, we're asked to `react` (https://webidl.spec.whatwg.org/#dfn-perform-steps-once-promise-is-settled) which ends up calling `PerformPromiseThen` (https://tc39.es/ecma262/#sec-performpromisethen) which calls `HostMakeJobCallback` (https://html.spec.whatwg.org/multipage/webappapis.html#hostmakejobcallback) [04:37:37.0314] in `HostMakeJobCallback` it wants the incumbent settings object, but since I'm just reacting to the HTML tree-build, there's no script-having execution context present. this breaks the assertion in `incumbent settings object` step 2.1 (https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object) [04:37:46.0403] what am I missing here? was something above supposed to do a "prepare to run callback" (and thus populating the backup incumbent settings object stack)? or could this be a spec issue? (if the spec assumes that fetch operations always happen within some kind of JS execution context) [04:58:09.0540] Oh hello Andreas Kling [04:58:33.0672] Fetching always assumes there's an environment settings object [04:58:55.0248] in this case, the document. always fetches with the document as the environment settings object [04:59:11.0389] the whole thing with promises is a bit out-of-spec, `` doesn't work on top of the JS `fetch()` [05:00:28.0532] specifically it's the request's client (https://fetch.spec.whatwg.org/#concept-request-client) [05:01:38.0680] hmm okay, so am I doing something wrong and I shouldn't end up in "fully read a body" in the first place? [05:02:22.0630] or what do you mean the thing with promises is a bit out-of-spec? :) [05:02:40.0110] oh I see what you mean, I forgot about that bit [05:25:34.0112] Andreas Kling: following the spec: `PerformPromiseThen` 10.b: Let fulfillJob be `NewPromiseReactionJob(fulfillReaction, value)`. `NewPromiseReactionJob` 1.e: let handlerResult be Completion(HostCallJobCallback(handler, undefined, « argument »)) (https://tc39.es/ecma262/#sec-newpromisereactionjob ) `HostCallJobCallback(callback, V, argumentsList)`: 3.: Prepare to run a callback with incumbent settings. https://html.spec.whatwg.org/multipage/webappapis.html#hostcalljobcallback The latter pushes to the backup stack [05:25:57.0613] https://html.spec.whatwg.org/multipage/webappapis.html#prepare-to-run-a-callback (1.:Push settings onto the backup incumbent settings object stack.) [05:27:18.0703] seems super-complex, I've never touched this part of the spec TBH [05:27:20.0881] earlier in `PerformPromiseThen` step 4.a, we call `HostMakeJobCallback`(https://html.spec.whatwg.org/multipage/webappapis.html#hostmakejobcallback), that's when the assertion fails [05:28:15.0865] agree this is very complex [05:28:33.0906] * earlier in `PerformPromiseThen` step 4.a, we call `HostMakeJobCallback`(https://html.spec.whatwg.org/multipage/webappapis.html#hostmakejobcallback), that's when the assertion fails [05:56:05.0974] Andreas Kling: some of it is a bit out of my comfort zone, but I think that if Fetch had a prepare-to/cleanup-after callback pair before/after the promise, with the task destination as the parameter, it would create the right result. I'm sure other people here can validate better though [06:05:23.0759] hmm all right. curiously, we already do basically that as a workaround in our implementation of `HostEnqueuePromiseJob` since a while back: https://github.com/SerenityOS/serenity/commit/25909dcc051db82bf7ab4e554a8eb8ec8b173863 [06:06:04.0944] would be great to have spec clarity on all relevant situations here. understood that it's outside your comfort zone, thanks for the help so far! :) [06:07:58.0544] Yea I agree it needs clarity. If this is validated I'd be happy to help with a Fetch PR [06:08:19.0949] much appreciated! [06:25:38.0685] Andreas Kling: I think actually a cleaner version would be to create a read request (https://streams.spec.whatwg.org/#read-request) in `fully read a body` (https://fetch.spec.whatwg.org/#body-fully-read) and not deal with promises at all [06:28:45.0778] I'm not familiar enough with streams (yet) to tell if that's a good idea, but I welcome any simplification :) [06:30:04.0044] I believe Mattias Buelens can shed some light here [09:10:16.0118] Hmm, this is indeed a bit awkward. We have "read a chunk" which takes a read request with chunk steps and error steps, which nicely keeps promises out of your way. However, "read all bytes" (https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes) still returns a promise... I'd say the better solution would be to refactor that abstract op in Streams, so it takes "success steps" and "error steps" instead. 2022-12-12 [20:55:44.0280] Mattias Buelens: `read all bytes` is a exported, so probably we need to create another one and have `read all bytes` call that? Or do we know that it's not in use outside of `streams`? [22:47:32.0637] https://github.com/whatwg/fetch/issues/1568 [23:24:09.0943] Usually we just track down all call sites across other specs and open pull requests to change those too. 🙂 [00:03:50.0475] Mattias Buelens: where do you track those? [00:04:31.0180] s/you/we [00:06:04.0739] Noam Rosenthal: are you aware of https://dontcallmedom.github.io/webdex/ ? [00:09:58.0952] Ms2ger 💉💉💉: I was NOT aware of this. This changes my life retroactively [00:10:50.0281] I wish we had better ways to share information like this than mentioning them occasionally on matrix [00:34:33.0402] Mattias Buelens: seems like callers rely on the promise behavior, so I preferred to add a new function. https://github.com/whatwg/streams/pull/1250 /cc Andreas Kling [01:10:58.0357] Ms2ger 💉💉💉: https://github.com/whatwg/meta/pull/265 as a start [01:11:42.0916] It's not quite PR template necessary just yet I think, but maybe at some point [02:00:04.0819] Andreas Kling: note https://github.com/whatwg/streams/issues/1178 as well; the streams integration is rather messy due to there not being a clean separation between platform streams and JS streams [02:02:04.0417] Andreas Kling: also, I saw you were looking at `file:` URLs, given that you're developing a new OS I'm not sure how much guidance Fetch could give, but presumably you want unix-y behavior? (Also made me wonder if you considered using a novel newline code point to mess with everyone.) [02:03:44.0167] our system fully Unix-like when it comes to filesystem things, so anything that works for Linux/BSD/etc would be good enough for us too :) [02:05:06.0582] I was mostly just amused by `file:` being an "exercise for the reader" per the spec [02:05:19.0336] * I was mostly just amused by `file:` being an "exercise for the reader" per the spec [02:09:28.0906] Andreas Kling: we do define `file:` URL parsing, but unfortunately there's another one of these: https://url.spec.whatwg.org/#origin [02:10:15.0709] (Browsers are somewhat close to making that an opaque origin, but I think there's still a bunch of special cases.) [06:39:42.0513] I kinda wanna try Mastodon but having to pick a server is making it difficult [06:46:23.0564] https://til.simonwillison.net/mastodon/custom-domain-mastodon looks interesting but apparently https://masto.host/pricing/ had too many interested parties [06:49:55.0833] > <@annevk:matrix.org> I kinda wanna try Mastodon but having to pick a server is making it difficult Hachyderm.io has worked well for me; I feel like I can trust the moderation policy and technical administration. [06:56:03.0910] Standards discussions are starting to happen on Mastodon, but I had trouble responding due to client instability haha [06:56:07.0522] Yeah I guess if I don't do my own domain name that's pretty good. And I didn't really attempt the own domain name with Matrix either... [06:56:55.0109] I heard good things about Ivory but it's not yet finished [06:58:00.0371] https://tapbots.social/@ivory/109433914793802708 (some podcasters I listen to have access to the beta) [06:58:38.0828] * https://tapbots.social/@ivory/109433914793802708 (some podcasters I listen to have access to the beta) [06:59:08.0119] > <@annevk:matrix.org> I heard good things about Ivory but it's not yet finished For iOS Metatext is quite nice [08:13:12.0811] > The dir IDL attribute on Document objects must reflect the dir content attribute of the html element, if any, limited to only known values. If there is no such element, then the attribute must return the empty string and do nothing on setting. Cursed. [09:02:31.0027] > Running again to show the original line numbers. Domenic sideshowbarker it seems this might no longer be needed? At least for me these numbers were the same. [13:46:07.0883] annevk: what was the context of that? if it was bikeshed, then while I try to surface line numbers when possible automatically, i can't do it all the time (since lxml sucks), thus the special mode that does destructive edits to get more line numbers in. [14:44:40.0668] annevk: they're almost never the same for me. You might've got lucky, or edited something early in the file. [14:44:52.0855] They're different because of the various insert-blocks-of-text-here steps. 2022-12-13 [00:29:13.0677] > <@annevk:matrix.org> I kinda wanna try Mastodon but having to pick a server is making it difficult You can migrate servers which will automatically migrate followers too. With that, I think choosing (and switching) servers are not as problematic. [00:29:35.0633] btw, https://docs.joinmastodon.org/user/run-your-own/#so-you-want-to-run-your-own-mastodon-server has a list of more server providers than just masto.host, if you want to choose your own domain [02:40:35.0818] E [02:48:35.0411] E [04:16:46.0352] Alejandra Bañuelos: [04:25:08.0876] Alejandra Bañuelos: Alejandra Bañuelos: Alejandra Bañuelos [04:25:11.0988] Q [13:32:49.0354] > <@annevk:matrix.org> > Running again to show the original line numbers. > > Domenic sideshowbarker it seems this might no longer be needed? At least for me these numbers were the same. Interesting. Dunno, will look today [14:26:09.0831] Domenic: https://stackoverflow.com/questions/74136196/why-does-web-streams-api-lack-duplex-stream [14:29:29.0080] You can use a `ReadableWritablePair` which works with `passThrough()` 2022-12-14 [16:16:22.0236] I don't know what `ReadableWritablePair` is, but indeed, any `{ readable, writable }` object works with `pipeThrough()`. [16:16:56.0341] That's the dictionary type name for `{readable, writable}` [16:17:02.0085] https://streams.spec.whatwg.org/#dictdef-readablewritablepair [16:17:11.0217] * That's the dictionary type name for `{readable, writable}` [16:17:17.0718] Ah, so it is. [01:19:33.0896] sideshowbarker: please don't, as Domenic mentioned I hit a rather unusual case. [02:02:35.0937] > <@annevk:matrix.org> sideshowbarker: please don't, as Domenic mentioned I hit a rather unusual case. Ah ok, I hadn't managed to make time yet to look anyway :) [03:31:42.0532] A stream question: ```js var readableStream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array(40)); }, type: 'bytes' }); var [branch1, branch2] = readableStream.tee(); reader1 = branch1.getReader({mode: 'byob'}); console.log(await reader1.read(new Uint8Array(8))) reader2 = branch2.getReader({mode: 'byob'}); console.log(await reader2.read(new Uint8Array(12))) ``` The first call obviously gets a view with length 8, and surprisingly the second call also gets a length 8 one instead of 12. Is this expected? If then what should a dev do to get 12-length view for the second call? [03:31:52.0063] * A stream question: ```js var readableStream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array(40)); }, type: 'bytes' }); var [branch1, branch2] = readableStream.tee(); reader1 = branch1.getReader({mode: 'byob'}); console.log(await reader1.read(new Uint8Array(8))) reader2 = branch2.getReader({mode: 'byob'}); console.log(await reader2.read(new Uint8Array(12))) ``` The first call obviously gets a view with length 8, and surprisingly the second call also gets a length 8 one instead of 12. Is this expected? [03:32:14.0410] krosylight|out-until-Jan-6: [03:32:24.0395] * A stream question: ```js var readableStream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array(40)); }, type: 'bytes' }); var [branch1, branch2] = readableStream.tee(); reader1 = branch1.getReader({mode: 'byob'}); console.log(await reader1.read(new Uint8Array(8))) reader2 = branch2.getReader({mode: 'byob'}); console.log(await reader2.read(new Uint8Array(12))) ``` The first call obviously gets a view with length 8, and surprisingly the second call also gets a length 8 one instead of 12. Is this expected? If then what should a dev do to get 12-length view for the second call? [03:40:45.0288] Hmm, Blink somehow fails to get byte stream from tee() while Node.js has the same behavior with Gecko [04:43:32.0422] Blink indeed is still working on implementing https://github.com/whatwg/streams/commit/cada8129edcc4803b2878a7a3f5e1d8325dc0c23 [04:44:10.0754] That behavior is expected because the source readableStream has already sliced out 8 bytes and handed that chunk to each branch [04:44:32.0384] If you want 4 more bytes you'd need to request them. (That will then slice another 4-byte chunk for each branch.) [04:45:36.0804] https://github.com/whatwg/streams/pull/1145 would be helpful for that, as it would aggregate the 8-byte and 4-byte chunks for you [04:46:19.0308] If Firefox is interested in implementing that I believe we can merge it. [04:51:24.0332] Hmm, so I think I thought that browsing context groups were 1:1 with agent clusters, but it seems like they aren't. More concretely what I want to know is "what's the set of browsing contexts that can access each other's DOM nodes?". Specifically for WebDriver-BiDi we want to be able to vend a reference to a Node that's usable in any context where that Node is reachable, but not outside of that context (so e.g. I should be able to write a BiDi script that gets a reference to, say, `window.opener.body` in some Window, assuming that's permitted by the security policy, and then use that reference in the opener Window to get the `` element). [04:51:37.0456] * Hmm, so I think I thought that browsing context groups were 1:1 with agent clusters, but it seems like they aren't. More concretely what I want to know is "what's the set of browsing contexts that can access each other's DOM nodes?". Specifically for WebDriver-BiDi we want to be able to vend a reference to a Node that's usable in any context where that Node is reachable, but not outside of that context (so e.g. I should be able to write a BiDi script that gets a reference to, say, `window.opener.body` in some Window, assuming that's permitted by the security policy, and then use that reference in the opener Window to get the `` element). [06:38:09.0186] jgraham: that would be all the browsing contexts belonging to a single agent cluster that belongs to a browsing context groups, though that gives you "can potentially access" (as some of those might only be same origin-domain once you use `document.domain`) [06:40:03.0351] jgraham: https://docs.google.com/presentation/d/1hi4gH7pJPHsg_hnIj77XN_ce54HIaNUnBLenVwohFVo/edit#slide=id.g5641ecbac9_0_0 and slide 13 give an overview (related slides have approximate definitions) [07:28:21.0328] Hmm, that seems distressingly complex. So given _node_ and _document_, is there an easy way to tell if _document_ is reachable from _node_'s Document? [07:28:33.0569] * Hmm, that seems distressingly complex. So given _node_ and _document_, is there an easy way to tell if _document_ is reachable from _node_'s Document? [07:36:06.0502] jgraham: maybe through IsPlatformObjectSameOrigin? Though that feels a bit hack-ish [07:37:36.0702] jgraham: I guess you can compare node's node document's surrounding agent's agent cluster with document's surrounding agent's agent cluster? Again, this gives you potentially reachable, not reachable. [07:45:37.0431] Yeah, so IsPlatformObjectSameOrigin doesn't work for mechanical reasons at least (it's not clear that Current Realm is well defined when you're calling from WebDriver, so you'd need to write an equivalent algorithm that takes a realm (or document or whatever) as a parameter). [07:48:02.0269] The difference between potentially reachable and reachable also seems relevant; it would be surprising if you could use WebDriver to get an element from document A in document B if that would usually require both A and B to set document.domain. 2022-12-15 [17:04:31.0233] > <@domenicdenicola:matrix.org> https://github.com/whatwg/streams/pull/1145 would be helpful for that, as it would aggregate the 8-byte and 4-byte chunks for you Thanks! I'm off for the rest of the year, I'll look into it next year [01:26:55.0601] That’s alot [01:27:53.0125] Yeah, kinda weird that it's a download. Anyway, I wish we had ways to prevent PRs from getting to that point. [01:42:05.0586] Automatic formatting might go a long way. [01:43:12.0878] Some kind of heads-up bot/automation is imaginable: When a PR reaches some configured threshold of number of comments (or rate of comments during a day or week), the bot comments with an alert saying, "This PR has accumulated a lot of comments" [01:44:55.0760] ...and then you could step back and reconsider if there's some change that could be made so that it doesn't end up accumulating even more [02:02:33.0531] Well, this isn't a heated discussion. It's the popover PR and as far as I can tell it's all constructive. It's just a big change with a lot of details to get right. Perhaps though we need something similar to TC39's staging process for bigger changes? [02:39:42.0033] Maybe so — but in general, it seems like when a PR has that many review changes, it has probably also been open for quite a long time, and if so, then you run into the technical problems of merge conflicts, and also the problem that the PR author and reviewers just get fatigued with it all [02:40:28.0025] so sometimes I guess it can be an opportunity to step back and consider doing some kind of course correction — breaking it into smaller commits if possible, or whatever [02:42:00.0227] but all that said, I know well that for some of the HTML PRs, it’s kind of unavoidable — because it’s necessary to touch a lot of places in the spec, and the relationships between the different parts can be complex [02:42:21.0005] * but all that said, I know well that for some of the HTML PRs, it’s kind of unavoidable — because it’s necessary to touch a lot of places in the spec, and the relationships between the different parts can be complex [03:06:18.0915] hi [04:02:04.0122] Well another problem is ecossytem breakage. For example all the navigation changes in HTML have totally broken WebDriver so the spec won't even build because there were breaking changes in the "API surface" of the HTML spec. And on the one hand, I get it that we want to make these changes and "just let the rest of the ecosystem deal with the fallout" is probably the only practical way to get it landed at all, but on the other hand you wouldn't get away with that kind of thing in a software project. [04:08:52.0640] I think my point, such as it is, is that because it's nonsense to "pin" an older version of a spec, the full set of web specs is essentially a (structured) monolith. But we treat them like they're independent "libraries" because we don't have the tooling required to handle the non-local impact of changes upfront. [04:47:17.0758] > <@jgraham_:matrix.org> Well another problem is ecossytem breakage. For example all the navigation changes in HTML have totally broken WebDriver so the spec won't even build because there were breaking changes in the "API surface" of the HTML spec. And on the one hand, I get it that we want to make these changes and "just let the rest of the ecosystem deal with the fallout" is probably the only practical way to get it landed at all, but on the other hand you wouldn't get away with that kind of thing in a software project. For someone who's dealt with the python 2 to 3 transition, you're quite positive about software :) [04:58:02.0342] Well that's fair. But I was thinking more about what you'd get away with in like a web browser where "sorry we updated the DOM internals so now the browser doesn't build" wouldn't fly. Or at an even bigger scale, something like the Google monorepo where you can't just check in breaking changes, but there's a lot of tooling support to make larger refactorings possible. [05:07:48.0847] jgraham: we tend to patch downstream proactively. Perhaps https://dontcallmedom.github.io/webdex/ wasn't used enough for the navigation changes, but I would expect people to try and do some due diligence on that front. [05:10:12.0011] Would be interesting to have tooling that surfaces which definitions disappear in a given PR - I guess there were plenty in the navigation pr [05:23:51.0860] Useful output diffs would help with that as well. It's one of the downsides of only checking in the source. But yeah, disappearing IDs are one of the other things people tend to overlook. [05:26:49.0077] Well ultimately the way you handle this is for changes to a lib/API/spec to build all consumers of that in CI, so you can see breakage directly. But we're far away from having that kind of tooling. [06:12:06.0082] Domenic: if you could give https://github.com/whatwg/html/pull/8496 another look tomorrow or so to validate the approach that would be appreciated; turns out "reflect" does a lot of heavy lifting, though we might be able to improve that over time 2022-12-16 [17:20:00.0601] We audited the IDs in the navigation API PR and preserved as many as we could. https://docs.google.com/document/d/1yxnzjRDVmAR5CC9GcAyY448lBD0u0E98eUEMHDhx1Dw/edit#heading=h.wljr2vzc2ntc [17:20:05.0081] The exported terms did indeed change [17:21:03.0647] But WebDriver and other parts of the ecosystem were very broken (using browsing contexts, and thus not working whenever COOP happened) so arguably it's just an improvement to have HTML updated, even if WebDriver was not. [17:21:12.0948] We did indeed file issues on places like WebDriver. [17:21:20.0314] And are willing to help advise on the best fixes. [19:16:14.0504] hey, I'm sorry for like just jumping in here lol [19:16:57.0238] I believe there should be an extra specification in html, for mastodon like distributed social media services to be able to connect with each other, just like there is for us to be able to send using any emailing service [19:18:26.0758] one of the issues with distributed social media services like mastodon is its impossible to "follow" another individual on another mastodon server without "copy pasting" the link to that server to another website and this partially is because there is no distributed spec through which this is possible within the web itself [19:19:10.0684] idk if this is too naive a question, or it perhaps doesn't matter because distributed social media services aren't popular and this may not be worth doing [19:19:48.0882] but yeah, basically I'm curious to if there are any solutions in the html spec that can be used to overcome this issue - without centralization [19:20:12.0499] I'm really sorry if this question is to naive or if I've come to the wrong forum to ask about this [20:12:03.0791] Normally for new features the process is https://whatwg.org/faq#adding-new-features . Here I guess it's a bit unclear whether the feature you're suggesting is a web platform feature at all (instead of, e.g., something that different social networking services should coordinate on building into their websites). But that might still be a useful starting point. [23:35:14.0560] I think Mastodon and such might even be based around https://w3c.github.io/activitypub/? Haven't looked at it too deeply, but that name came up. [01:42:12.0035] freddy: at some point we discussed `setHTML(input, { sanitize: "unsafe-none" })`, right? [01:42:32.0485] I have never heard of this. [01:42:36.0378] freddy: we might still need that, but it would prolly be bad to only ship that at first [01:43:25.0193] What is "that"? A Sanitizer that doesn't sanitize? I suppose you could use innerHTML instead? [01:44:06.0130] freddy: it's using the parser without a sanitizer [01:44:36.0852] freddy: and you can't really use `innerHTML` as you might have to set some other option, such as `enableShadowRoots: true` [01:56:48.0575] > <@annevk:matrix.org> I think Mastodon and such might even be based around https://w3c.github.io/activitypub/? Haven't looked at it too deeply, but that name came up. Seems so, but with a couple of proprietary extensions https://github.com/mastodon/mastodon/blob/main/FEDERATION.md [02:00:14.0110] The ActivityPub community has a Matrix space with a bunch of rooms #activitypub-community:codelutin.com [02:04:07.0720] #fediverse:pixie.town seems to be the main room [04:41:00.0796] > <@domenicdenicola:matrix.org> Normally for new features the process is https://whatwg.org/faq#adding-new-features . Here I guess it's a bit unclear whether the feature you're suggesting is a web platform feature at all (instead of, e.g., something that different social networking services should coordinate on building into their websites). But that might still be a useful starting point. thank you! 2022-12-17 [19:15:14.0011] https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo has a couple of sections with info that seem also generally useful to anybody in our world who’s writing specs or designing APIs — specifically, these sections: - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#a-word-on-designing-apis - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#philosophy [19:15:43.0708] * https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo has a couple of sections with info that seems also generally useful to anybody in our world who’s writing specs or designing APIs — specifically, these sections: - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#a-word-on-designing-apis - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#philosophy [19:15:50.0132] * https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo has a couple of sections with info that seem also generally useful to anybody in our world who’s writing specs or designing APIs — specifically, these sections: - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#a-word-on-designing-apis - https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#philosophy 2022-12-19 [20:22:34.0034] hi [20:23:00.0239] That’s wassup [20:26:49.0449] ok ill try follow.i can try fix it . but i dont have the best brain like my grandma [21:19:00.0936] ‎Use this link to join a WhatsApp video call: https://call.whatsapp.com/video/YloA56FQVyaibkIXpSJ9Ix [21:19:01.0710] ‎Use this link to join a WhatsApp video call: https://call.whatsapp.com/video/YloA56FQVyaibkIXpSJ9Ix [21:20:54.0035] Can you throw an exception in steps that return a promise? Does that just magically reject the promise in WebIDL or... [21:25:46.0886] https://w3ctag.github.io/promises-guide/#always-return-promises seems to say no [21:32:12.0093] Oh nvm, it does say WebIDL should take care of things automatically [23:38:20.0951] Dominic Farolino: I'm not sure if the promises guide is a good reference, I'd recommend reading Web IDL directly [23:39:25.0031] Oh, I guess it has been overhauled since it no longer seems to include example prose [23:39:36.0529] * Oh, I guess it has been overhauled since it no longer seems to include example prose [06:01:49.0708] So in order to avoid writing `document.documentElement` folks will write `` so they can use `html`. [06:54:06.0689] that's a fun hack [06:56:16.0821] miketayl_r: will I encounter this on a slide at a future web developer meetup? 😅 [06:56:41.0365] Domenic: any interest in making the Live URL Viewer show the origin field? [07:03:12.0074] i'm going to start using `` just to spite future me [07:03:50.0949] `` [07:08:29.0436] What's the canonical way to start a timer for some task in spec prose? I would guess calling https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timer-initialisation-steps, but that dfn isn't exported, and I'm certain we shouldn't call the actual DOM setTimeout() function from a spec algorithm... [07:29:57.0143] Dominic Farolino: "run steps after a timeout" [07:31:51.0945] Note that you'll have to queue your own task if you need one [07:42:19.0754] Thanks [07:43:25.0707] Btw what is the common way to assert that a set of steps are running i.e., on the main thread. Just something like Assert: These steps are running on the FOO task source? Not sure if there is a more formal way... [07:45:38.0551] ey - someone knows if **comment** is a self-closing tag in xml/html/xhtml/html5 ? means - this comment : `` not ` thing ` as was somewhen in IE... [07:46:37.0760] cause for me it looks even more out of specs than doctype tag... [07:52:48.0326] * cause for me it looks even more out of specs/inconsistent than doctype tag... [08:09:26.0272] cause while i can know that doctype is self-closing for comment there is no such info [08:10:03.0503] Dominic Farolino: maybe assert there's a current settings object or a surrounding agent? [08:10:52.0883] hacknorris: there's no comment element or comment tags [08:11:08.0312] > <@annevk:matrix.org> hacknorris: there's no comment element or comment tags i meant `` [08:11:21.0969] in both html, xml and all related markups [08:11:26.0287] * in both html, xml and all related markups [08:11:51.0733] I'm not sure what you mean here? [08:12:19.0080] no, already fine, i just see you had a lag but then i thought it was plain ignorance =] [08:13:38.0109] So what is the question then? [08:13:50.0532] is `` self closing [08:14:32.0341] Comments have no contents in the DOM tree, so there's nothing to close [08:14:35.0423] unless you mean skipping the final `-->` [08:15:30.0818] no i mean if its self closing thing cause it neither looks like ` <-->` neither `