07:11 | <annevk> | Dominic Farolino: no, a preflight only validates if the server is capable of handling the request, it doesn't validate if a specific resource wants to hand over data; you can kinda think of it as request vs response authorization |
07:19 | <sideshowbarker> | annevk: looking at https://stackoverflow.com/questions/75764299/lack-of-automatic-encoding-of-get-parameters-a-bug-chrome-and-edge and wondering what’s supposed to happen there per-spec, and why. I would think that browsers should percent-encode that square bracket, as the OP expects. But no browsers do. |
08:16 | <Domenic> | annevk: looking at https://stackoverflow.com/questions/75764299/lack-of-automatic-encoding-of-get-parameters-a-bug-chrome-and-edge and wondering what’s supposed to happen there per-spec, and why. I would think that browsers should percent-encode that square bracket, as the OP expects. But no browsers do. |
08:18 | <sideshowbarker> | ] is not in the percent-encode set. https://jsdom.github.io/whatwg-url/#url=aHR0cHM6Ly9leGFtcGxlLmNvbS9wYV10aD9xdT9lcnkjaGFzXWg=&base=YWJvdXQ6Ymxhbms= https://url.spec.whatwg.org/#query-percent-encode-set |
08:19 | <Domenic> | https://github.com/whatwg/url/issues/753 and https://github.com/whatwg/url/issues/379 are relevant |
08:21 | <sideshowbarker> | I guess the specific relevant set here is https://url.spec.whatwg.org/#query-percent-encode-set |
08:22 | <sideshowbarker> | I mean, for the SO question |
09:18 | <annevk> | sideshowbarker: right, the validation requirements currently match RFC 3986 and 3987 (I thought I had stopped caring about 3987 and personally I might have, but the spec seems to match still) |
09:18 | <annevk> | Maybe I should say "aim to match", as Domenic likes to point out we haven't done anything close to formally proving that |
09:38 | <annevk> | smaug: perhaps we could require element(s)-reflecting attributes to be connected and create more GC opportunities when they are not? Though I think this would require an element was disconnected listener to clear any cached object. |
09:43 | <smaug> | requiring some manual clearing is a problem. Easy to forget. (just this week analyzed a semi-large website which was leaking like crazy because they were not clearing something - this time it was JS objects though, not DOM nodes) |
09:56 | <annevk> | smaug: the disconnected listener would be part of the browser, to be clear |
09:56 | <smaug> | ah |
09:59 | <smaug> | connected elements are kept alive anyhow, so the reference could be then just weak, no? But do we expose GC behavior if one uses expando properties on disconnected nodes? |
10:08 | <smaug> | Hmm, and connected... what if the other node is moved to another Document, and that document itself would be GCed if there weren't these references? Or do we handle not-the-same-document somehow? |
10:09 | <annevk> | smaug: to handle that we'd need more listeners, which doesn't seem ideal |
12:15 | <annevk> | smaug: the reason the reference is strong is because it's a JS object |
12:26 | <Jake Archibald> | annevk: I filed https://github.com/whatwg/html/issues/9046 for the event timing issue. It might happen with 'input' events too. |
12:31 | <annevk> | UI Events, sigh |
12:33 | <Jake Archibald> | Also wrote up the throw-or-not case, which was a fun bit of research https://github.com/whatwg/html/issues/9045 |
12:34 | <Jake Archibald> | <dialog> seems pretty inconsistent with itself |
12:34 | <annevk> | Jake Archibald: the concern with 4 does not apply to 3? Does each step on "update the rendering" end up running microtasks? |
12:35 | <Jake Archibald> | annevk: hmm, I guess it could be a problem if the change isn't triggered by script. There are microtask checkpoints within the render steps, but those are weird. |
12:35 | <Jake Archibald> | Good catch. |
12:37 | <Jake Archibald> | Actually, the changes would happen in a task, and there's always a microtask checkpoint afterwards |
12:37 | <annevk> | I'm not concerned about running script with attribute changes, but input listeners running when the tree changes seems more concerning. |
12:38 | <Jake Archibald> | annevk: the use-case would be, eg, transforming the input, like making it all uppercase, or auto inserting - in US phone numbers |
12:38 | <Jake Archibald> | By queuing a task, you risk a flash of untransformed content. Maybe beforeinput is better for this |
12:40 | <annevk> | Jake Archibald: surely each step in "update the rendering" doesn't equal a task? |
12:40 | <annevk> | I guess I don't actually really know how that works |
12:40 | <Jake Archibald> | annevk: there's a microtask checkpoint after running script, no matter where in the loop it happens |
12:41 | <annevk> | Right, because there's not going to be script on the stack at that point. |
12:42 | <annevk> | Okay, I guess 3 could work. (Or generalize CEReaction.) |
12:43 | <Jake Archibald> | Hopefully it's not a breaking change 😬 |
12:43 | <Jake Archibald> | Keeping it async reduces the risk I guess |
14:38 | <Pascal Müller> | Hi, I'm a DOM noob. Imagine you have a site e.g. "<p>Hello <span>I <a href="#">am</a><div> very funny.</p><bold>Truly!</bold>". You get all the text: "Hello I am very funny. Truly". Now assume we put that text into some fancy algorithm and it gives us back "I am very" and you now wanna wrap that in a <mark></mark> tag to highlight it. How would you do that? E.g. how would I get all the nodes corresponding to "I am very" s.t. I could get the "first" and "last" and add a <mark> resp. </mark> to it? Could I e.g. do something like number all the nodes and set up some mapping? Any input is welcome. :) |
15:19 | <annevk> | Ms2ger: do you happen to know where WebAssembly.Global.prototype.type is defined? |
15:20 | <Ms2ger> | annevk: https://github.com/WebAssembly/js-types/blob/main/document/js-api/index.bs |
15:20 | <Ms2ger> | No built spec - https://github.com/WebAssembly/js-types/issues/23 |
15:28 | <annevk> | Ms2ger: https://webassembly.github.io/js-types/js-api/index.html seems to contain a definition, but I guess due to that issue you can't be sure |
16:04 | <annevk> | (thanks btw!) |