10:30
<ondras>
JakeA: a quick fetch question: is it possible to make a cross-domain anonymous request (no credentials, response available to JS) ?
12:23
<ondras>
hmm
12:23
<ondras>
anyone else with a decent fetch knowledge?
12:41
<JakeA>
ondras: no, that's not allowed
12:42
<JakeA>
Unless the response is CORS
12:44
<JakeA>
fetch(url) won't use credentials, but if it's cross origin it'll fail unless it passed a CORS check
12:44
<ondras>
damn
12:45
<ondras>
that would be a nice feature (as in AnonXMLHttpRequest), something not doable with a XHR I think
12:46
<ondras>
JakeA: what is the reasoning for not allowing this?
12:47
<JakeA>
ondras: it'd mean you could use the user as a proxy for content that's supposed to be secured by their wifi login
12:47
<JakeA>
Intranets etc
12:48
<JakeA>
Ideally those would have their own login, but that often isn't the case
12:48
<ondras>
aha, interesting, thanks
12:49
<JakeA>
Eg "if IP address looks like Apple employee, scan for test servers and see what they're working on"
12:49
<ondras>
makes full sense.
12:49
<ondras>
unfortunately, due to absence of progress + abort + timeout, looks like I will have to use XHR for my next project :/
12:49
<ondras>
good luck on moving forward with these!
12:50
<JakeA>
Of course, native apps have this ability to scan, but hey
12:50
<JakeA>
ondras: cheers. What's your abort use-case btw?
12:51
<JakeA>
As in, what kind if resources are you likely to abort, and under what conditions?
12:51
<ondras>
JakeA: in a map app, every time the use pans the viewport, I have to request data from server to display on the map
12:51
<ondras>
JakeA: this is a potentially lengthy operation and the user can pan/zoom the map frequently
12:52
<ondras>
I would like to abort the non-completed "lookup" request as soon as a new needs to be generated
12:52
<tilal6991>
Ms2ger: Hey. I'm working on the implementing the permissions API in blink/chromium along with mounir.
12:52
<tilal6991>
i.e. the one at https://w3c.github.io/permissions/
12:53
<tilal6991>
annevk mentioned on our intent to implement that what we have for request may not be valid idl because we cannot distinguish between a dictionary and a sequence of dictionaries
12:54
<tilal6991>
However, having read the webidl spec, it seems like distinguishing between the two is actually possible
12:54
<tilal6991>
Can you let me know if this is the case?
12:56
<JakeA>
ondras: gotcha. Would you say the a abort would more likely occur before receiving any of the response body, or during the response?
12:56
<ondras>
JakeA: before
12:58
<JakeA>
ondras: cheers
12:59
<ondras>
JakeA: good luck with fetch. and thanks for the explanation! :)
13:11
<ondras>
Domenic: ?
13:34
<Ms2ger>
tilal6991, seems like you might be correct
13:39
<tilal6991>
Ms2ger: awesome thnaks :)
16:31
<TabAtkins>
tilal6991: Yeah, it *originally* wasn't possible to distinguish, but this was brought up as an issue a while ago, and we decided to make them distinguishable. All it means is that if your dictionary has a .length property as well, it might get mistaken as a sequence accidentally. ^_^
16:32
<Ms2ger>
TabAtkins, sequence uses @@iterator
16:32
<TabAtkins>
Ms2ger: Ah, kk. That's safer, then.
17:18
<wanderview>
annevk: Domenic: https://etherpad.mozilla.org/streams-f2f-july
17:27
<yhirano_>
wanderview: What does "distributed streams" mean?
17:28
<yhirano_>
wanderview: sorry, i misread.
17:28
<wanderview>
yhirano_: disturbed streams means reading the first part of the stream, unlocking, and then passing it on...
17:29
<yhirano_>
wanderview: thanks, then it is part of bodyUsed problem?
17:29
<wanderview>
so... the idea that partial stream reads should block further use of the Response object
17:29
<wanderview>
yhirano_: yea, a lot of these are related
17:33
<yhirano_>
wanderview: I have a question, can I write to the pad? or is it better to ask here?
17:37
<annevk>
yhirano_: either way is fine
17:37
<annevk>
yhirano_: I guess you're not in SF?
17:37
<yhirano_>
I'm in japan
17:37
<annevk>
:/ but thanks for paying attention!
17:39
<yhirano_>
IsDisturbed can be called for locked stream? I think it would be good to disallow monitoring locked stream.
17:39
<Domenic>
good point...
17:39
<Domenic>
it's not author-accessible though
17:40
<Domenic>
hmm
17:41
<Domenic>
yhirano_: thanks for bringing that up
17:41
<yhirano_>
respondWith(resp.body); console.log(resp.body.bodyUsed)
17:45
<yhirano_>
I think "at least one byte was read by already released readers" makes sense.
17:47
<Domenic>
it might be easier to just do ".read() was ever called" even if that gives unintuitive results for empty streams
17:47
<Domenic>
otherwise it's hard to avoid bodyUsed true -> false transitions
17:50
<yhirano_>
sorry I don't think my proposal causes true -> false transition.
17:51
<Domenic>
yhirano_: yes, but I think we want resp.body.json(); resp.bodyUsed === true
17:53
<Domenic>
yhirano_: otherwise consumers would have to do if (!resp.bodyUsed && !resp.body.locked) { /* can use */ }
17:53
<yhirano_>
hmm. I thought anyway the author should see .locked
17:54
<annevk>
yhirano_: what we're coming around to is that you have explicit empty (null) and maybe empty (a stream where you don't know it's really empty until you start reading it)
17:55
<annevk>
yhirano_: and that for the latter it's fine that IsDisturbed gets set when you start reading it, even though nothing might end up being read
17:56
<yhirano_>
thanks for the explanation.
17:57
<annevk>
yhirano_: does it seem acceptable?
17:58
<yhirano_>
yes.
17:58
<Domenic>
yay :)
17:58
<annevk>
\o/
18:00
<yhirano_>
read() on maybe empty stream sets IsDisturbed looks not so different from getReader() on maybe empty stream sets IsDisturbed, though
18:01
<Domenic>
that's true
18:02
<Domenic>
except that you might use getReader() to observe the stream without disturbing it
18:02
<yhirano_>
yes...
18:02
<Domenic>
E.g. with .closed (although that would be messy code) or some potential future .state or .queueSize or similar
18:02
<Domenic>
so it is probably better to stick with .read()/.cancel() as the disturbers
18:03
<wanderview>
yea... mutators should disturb... and allow getters without disturbing
18:04
<yhirano_>
ok, I have no shiny idea then.
18:29
<yhirano_>
wanderview, annevk, Domenic: thank you, I have to go to bed...
18:29
<annevk>
nn
18:30
<annevk>
tilal6991: hmm, it just works? Interesting, I thought dictionary or ... wasn't a thing
18:30
<annevk>
tilal6991: still not convinced this is the API we want to implement though
18:34
<TabAtkins>
annevk: It *originally* wasn't a thing, but that ended up being really annoying, so instead we do type-checking on the object first and only match it to dictionary if it fails.
18:52
<annevk>
I see
20:37
<Domenic>
annevk: https://github.com/whatwg/streams/issues/378
20:59
<Domenic>
https://github.com/whatwg/streams/milestones/Fetch%20with%20streams%20integration%20prerequisites
22:46
<annevk>
https://w3c.github.io/mediacapture-main/getusermedia.html
22:46
<annevk>
https://w3c.github.io/media-source/
22:51
<Sebmaster>
annevk: !
22:51
<Sebmaster>
I had a thing
22:51
<Sebmaster>
Lemme check what it was
22:54
<Sebmaster>
annevk: https://github.com/jsdom/whatwg-url/compare/ee5da1da68e016a4bcf6addd1d29f4a98191323c...590d1fa4fd9e4270c3fd8f8cdb08d7f94a65eb31 basically
22:57
<annevk>
file a bug against web-platform-tests?
22:57
<annevk>
if you mean you have new test
23:00
<Sebmaster>
annevk: yeah that too, but I noticed it because the spec doesn't handle 0s well
23:00
<Domenic>
annevk: wanderview https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL
23:01
<annevk>
Sebmaster: hmm, file a bug on the spec
23:01
<annevk>
Sebmaster: ideally with a pointer to that diff
23:01
<Sebmaster>
Will do... Tomorrow
23:01
<annevk>
Sebmaster: don't really have time today either
23:01
<annevk>
Sebmaster: ta!
23:04
<annevk>
wanderview: Domenic: https://github.com/whatwg/fetch/issues/49
23:19
<annevk>
jsbell: hey
23:19
<annevk>
jsbell: are you in the SF office by any chance and have a spare minute?
23:20
<jsbell>
annevk: yep...
23:20
<annevk>
jsbell: we're wondering about structured cloning of streams
23:20
<annevk>
jsbell: we can sort of figure it out, but the somewhat harder case is indexed db
23:20
<jsbell>
annevk: where are you?
23:21
<annevk>
jsbell: we're at the Moz office
23:21
<annevk>
jsbell: actually, Domenic thinks he wants to think it through first
23:21
<annevk>
jsbell: so let's leave it for today
23:21
<jsbell>
annevk: okie dokie