03:35
<caitp>
q2 2015, all your problems will be solved, and you'll have a freshly minted set of new problems
03:36
<caitp>
er, 2016 =]
08:18
<annevk>
gsnedders: could you have a look at https://github.com/whatwg/html/pull/329?
10:42
<bblfish>
hi annevk , all, I am having trouble with ServiceWorkers
10:42
<bblfish>
I have tried a few things
10:42
<bblfish>
If I start a ServiceWorker locally at http://localhost:63342/rww-scala-js/root/html/foaf.html
10:43
<bblfish>
I can see it intercept local calls
10:43
<bblfish>
But the serviceworker does not seem to catch a call to https://joe.example:8443/2013/card#me
10:43
<bblfish>
( without the hash )
10:44
<bblfish>
$ curl -ik https://joe.example:8443/2013/card | head
10:44
<bblfish>
HTTP/1.1 401 Unauthorized
10:44
<bblfish>
Access-Control-Allow-Origin: *
10:44
<bblfish>
Content-Type: text/html; charset=utf-8
10:44
<bblfish>
WWW-Authenticate: Signature realm="/"
10:44
<bblfish>
Content-Length: 2374
10:45
<bblfish>
If I run Chrome with `chromium --unsafely-treat-insecure-origin-as-secure=https://joe.example:8443 --user-data-dir=/tmp/hjs/ ` and start with a page http:s//joe.example:8443/rww-scala-js/root/html/foaf.html
10:46
<bblfish>
then the serviceworker won't load due to a TLS exception ( probably due to self signed cert )
10:48
<annevk>
What does call mean?
10:48
<annevk>
Self-signed certificates are a bad idea, just don't
10:49
<bblfish>
call = GET
10:49
<annevk>
That is not sufficient context
10:49
<bblfish>
well I am using self signed cert to run the server on my local machine
10:51
<bblfish>
this is the call annevk https://github.com/read-write-web/rww-scala-js/blob/fcec7c88c78f626ec04d60e64999deda15633958/src/main/scala/rww/store/WebResourceActor.scala#L106
10:52
<bblfish>
and this is the fetch event listener https://github.com/read-write-web/rww-scala-js/blob/fcec7c88c78f626ec04d60e64999deda15633958/src/main/scala/rww/auth/ServiceWorkerAuth.scala#L137
10:54
<annevk>
I don't really understand this code
10:55
<annevk>
Are you saying that foaf.html has some JavaScript that uses fetch() to get to the joe.example resource and somehow that does not get intercepted?
10:57
<bblfish>
yes. fhttp://localhost:63342/rww-scala-js/root/html/foaf.html is a Single Page App written in Scala-JS compiled to JS that uses fetch ( first link above ) to get the joe.example card URL that I curled above. That fetch does not get intercepted.
10:58
<bblfish>
does not get intercepted by the ServiceWorker.
10:59
<bblfish>
Not sure if that is an issue with ServiceWorkers only intercepting HTTPS calls, or what it could be due to.
10:59
<bblfish>
this is a cross origin call.
11:00
<bblfish>
Also I am not even sure if I am meant to be able to do this.
11:00
<annevk>
That sounds like a bug. Are you sure the service worker is properly registered and used for the page?
11:02
<bblfish>
Well it does register and intercepts. Perhaps it needs to be tuned
11:02
<bblfish>
I have the following in my console
11:02
<bblfish>
ServiceWorker registered Thu Nov 12 2015 10:40:33 GMT+0000 (GMT) successfully : {"installing":null,"waiting":null,"active":{}}
11:04
<bblfish>
btw. the initial non service worker Fetch code does receive a response and it knows it received a 401
11:05
<bblfish>
but it only seems to get 1 header -> content-type:text/html; charset=utf-8
11:06
<bblfish>
That is Chromium 48.0.2561.0 canary
11:06
<bblfish>
perhaps I'll try Firefox to see
11:10
<bblfish>
Same in Firefox Developer edition 44.0a2 (2015-11-05)
11:11
<bblfish>
If I fetch localhost content I get full headers in the fetch response, but with remote fetch I only get the content-type header
11:13
<annevk>
Ms2ger: when you introduced /target override/, is it correct that everything else in the algorithm is then relative to target override?
11:13
<annevk>
Ms2ger: that seems wrong, because if that is the case, why would you not just set target to something else
11:15
<annevk>
bblfish: it's unclear whether that means the service worker is the active one for the document
11:17
<Ms2ger>
annevk, uh, not sure
11:17
<Ms2ger>
annevk, the thing is that you need to set event.target to something else?
11:18
<annevk>
Ms2ger: yeah, but the rest of the algorithm uses event.target for various things
11:18
<Ms2ger>
Hmm
11:18
<annevk>
Ms2ger: I'm thinking the rest of the algorithm should probably use /target/ for that
11:18
<annevk>
Ms2ger: reviewing this
11:18
<Ms2ger>
I think that may be the case, yes
11:18
<annevk>
Ms2ger: I'm in the process of making this all a bit more clear with more explicit arguments
11:19
<annevk>
Ms2ger: I guess I'll fix that in a distinct commit
11:19
<annevk>
Ms2ger: somewhat surprised nobody catched it thus far
11:19
<bblfish>
mhh, trying to test the ServiceWorker.
11:19
<annevk>
Ms2ger: confirms that this is almost never read
11:22
<bblfish>
if I remove all the code from the fetchListener except the log then I do see the service worker intercepting the call.
11:22
<bblfish>
What it does not like is the e.respondWith { ... }
11:22
<bblfish>
it seems
11:23
<annevk>
bblfish: what does it do?
11:26
<bblfish>
well without e.respondWith it tells me I made a call in the console. with it not even that happens. https://github.com/read-write-web/rww-scala-js/blob/fcec7c88c78f626ec04d60e64999deda15633958/src/main/scala/rww/auth/ServiceWorkerAuth.scala#L137
11:27
<Ms2ger>
annevk, do you have a test too? :)
11:27
<annevk>
Ms2ger: I haven't checked yet
11:27
<annevk>
Ms2ger: still refactoring
11:28
<annevk>
Ms2ger: did you create a test for the target override stuff?
11:28
<Ms2ger>
Good question
11:30
<bblfish>
which is pretty weird...
11:31
<annevk>
Ms2ger: cannot really find anything
11:31
<Ms2ger>
annevk, html/syntax/parsing/the-end.html has a check
11:31
<Ms2ger>
window.addEventListener("load", this.step_func_done(function(e) {
11:31
<Ms2ger>
assert_equals(e.target, document, "target should be document");
11:32
<annevk>
Ms2ger: so per the language in the spec right now, ignoring the obvious problems with talking about members directly rather than internal slots, that event would also dispatch on document
11:33
<annevk>
Ms2ger: and not only that, its phase on window would be BUBBLING and/or CAPTURE
11:34
<annevk>
Ms2ger: it seems you chickened out of testing eventPhase though
11:36
<Ms2ger>
annevk, patches welcome, or file an issue :)
11:39
<annevk>
Ms2ger: <script>document.onload=onload=x=>w(x.eventPhase)</script> is my minimal testcase
11:39
<annevk>
Ms2ger: returns 2 and only once
11:39
<annevk>
Ms2ger: so yeah, /override target/ should only override event's target and nothing else
11:47
<annevk>
Ms2ger: haha
11:48
<annevk>
Ms2ger: I just noticed I fixed this exactly two years after you broke it with https://github.com/whatwg/dom/commit/d0f2c0bbc940061ac2a4623553de5c26409cce96
11:50
<annevk>
Ms2ger: https://github.com/w3c/web-platform-tests/issues/2321
11:52
<bblfish>
annevk: this actually works https://github.com/read-write-web/rww-scala-js/blob/fcb110260cf8fe39fa5260bae14d7a73181bdf9d/src/main/scala/rww/auth/ServiceWorkerAuth.scala#L137
11:53
<annevk>
bblfish: you can keep sending me scala links, but my ability to comprehend them is not increasing
11:53
<bblfish>
yep. It's probably to do with my trying to cast the scala promise in the andThen { } which returns a Promise[Any] to a Promise[Response] is the problem
11:54
<bblfish>
I'll ask the scala-js folks
11:56
<bblfish>
yep.
11:58
<bblfish>
there is a problem with scala-js that I need to work out with them, but I have found a workaround https://github.com/read-write-web/rww-scala-js/blob/b342c8f9c54825eab300ac264a4f26774ea31b52/src/main/scala/rww/auth/ServiceWorkerAuth.scala#L137
11:59
<bblfish>
annevk: that actually works. The problem is here that I only get the Content-Type header, not the WWW-Authenticate one
11:59
<annevk>
Ms2ger: is filing issues for tests that need to be created acceptable?
11:59
<annevk>
Ms2ger: I guess I could do that more often
11:59
<Ms2ger>
annevk, yes, please do
11:59
<annevk>
bblfish: so you're using CORS?
12:00
<bblfish>
perhaps I have to add another header to cors.
12:00
<annevk>
bblfish: are you using Access-Control-Expose-Headers?
12:00
<bblfish>
nope. TimBl's card has also this one Access-Control-Allow-Credentials: true
12:01
<bblfish>
curl -i https://www.w3.org/People/Berners-Lee/card | less
12:03
<bblfish>
I'll try adding those. Perhaps then I won't actually need serviceworkers...
12:03
<annevk>
If you just want to inspect a networked resource, you don't need service workers
12:55
<bblfish>
annevk: I added `Access-Control-Expose-Headers: WWW-Authenticate` and I can see it then from the normal fetch
12:57
<bblfish>
thanks for the help. Sitting on too many bleeding edges : Fetch, WebCrytpo, Scala-JS, ServiceWorkers, soon IndexDb ( to store the key at least. )
12:58
<bblfish>
...cors,
12:59
<bblfish>
... TLS
13:13
<annevk>
CORS is pretty old now
13:18
<espadrine>
on the other hand, TLS…
13:34
<annevk>
Well, yes
13:49
<zcorpan>
is it possible to escape @mention and emoji with github flavored markdown? backslash doesn't work. `@`mention works but looks funny
13:51
<zcorpan>
html entity doesn't work either
13:58
<annevk>
yoav: interested in providing another PR?
13:58
<yoav>
annevk: yeah, I'm taking a stab at adding that text.
13:59
<annevk>
cool
13:59
<annevk>
zcorpan: non-visible space?
14:01
<zcorpan>
annevk: yep, thanks
14:08
zcorpan
filed https://github.com/jch/html-pipeline/issues/232
14:35
<zcorpan>
https://github.com/whatwg/resources.whatwg.org/pull/10 https://github.com/whatwg/resources.whatwg.org/pull/11
14:42
<annevk>
zcorpan: should prolly get Domenic to review? Looks fine to me though
14:43
<zcorpan>
ok
15:15
<Domenic>
zcorpan: assuming you have smoke tested these LGTM
15:15
<zcorpan>
i have yeah
15:15
<Domenic>
Seems like there should be a better way to do the first...
15:16
<Domenic>
But all I can think of is code-ifying everything
15:16
<zcorpan>
first what?
15:16
<Domenic>
Maybe there is a Markdown escaper algorithm somewhere
15:16
<Domenic>
The first PR
15:17
<zcorpan>
oh, yeah i suppose you could have a state machine instead, but this is only 1000 characters
15:19
<zcorpan>
i considered having a single replace(regexp, func) but i thought it looked too bloated
15:19
<zcorpan>
this seems like simplest to maintain
15:21
<Domenic>
Yeah seems good
15:23
<smaug____>
annevk: sanity check, please :) "Let target be the MessagePort in whose port message queue the event e now finds itself." sounds odd to me in https://html.spec.whatwg.org/multipage/comms.html#dom-messageport-postmessage e is a DOM event which has just been created, not put to any queue
15:23
<smaug____>
and "port message queue " is a task source, not some DOM event queue
15:24
<smaug____>
am I missing something?
15:24
<zcorpan>
https://github.com/w3c/webvtt/pull/253 would like review from html folks on this. (i think the lack of "parse error" is technically wrong for a lone ampersand, but then webvtt parser doesn't discuss parse errors in the first place, yet...)
15:31
<smaug____>
https://github.com/whatwg/html/issues/333
17:00
<bblfish>
annevk: true, they are not all bleeding edge. :-) Still quite a lot of new tools to get a grip with.
17:50
<annevk>
smaug____: yeah that reads weird
17:50
<annevk>
smaug____: furthermore, it seems weird that the MessageEvent is created way before being dispatched
17:51
<annevk>
smaug____: since that means it might be created with the wrong prototype chain and such
17:51
<annevk>
smaug____: which doesn't seem like something we'd want
17:51
<smaug____>
yeah, I was wondering that too, but then wasn't sure whether the spec actually defines which prototype should be used
17:56
<annevk>
I don't think we really do at the moment, but we should down the line
17:56
<annevk>
It might fall out of IDL
17:56
<annevk>
But we should at least be creating objects in the correct place, not in something that could be a different thread
17:58
<annevk>
I love how DreamHost is now contacting me again about TLS issues since it appears my blogpost has been doing the rounds
18:06
<annevk>
smaug____: ah, thanks for filing an issue
19:42
<wanderview>
JakeA: is there any reason there is no .registration on the window-side ServiceWorker object?
19:44
<zcorpan>
sigh i broke the quoting anyway
19:48
<zcorpan>
fixed
19:49
<wanderview>
JakeA: so window could do navigator.serviceWorker.controller.registration.update()
20:34
<wanderview>
maybe because it would cause a cycle through the registration.installing attribute and friends?
21:12
<wanderview>
fg
21:12
<wanderview>
oops