| 03:44 | <MikeSmith> | TabAtkins: so, without doing an install (but just relying on the relative import), using `import highlighter` and then calling `highlighter.highlight(...)`, I’m getting “AttributeError: module 'highlighter' has no attribute 'highlight'” |
| 03:46 | <MikeSmith> | ah nm that, I guess it was because my shell was invoking Python3 instead of Python2.7 |
| 03:47 | <MikeSmith> | hmm but now I get “ImportError: cannot import name text_type”, so I guess that’s a dependency I don’t have installed yet |
| 03:49 | <devsnek> | do any browsers implement worker type: 'module' |
| 03:50 | <MikeSmith> | TabAtkins: oh hmm but that’s part of pygments, which I do have installed |
| 03:53 | <MikeSmith> | my /usr/local/lib/python2.7/site-packages/pygments/util.py has no text_type |
| 03:54 | <MikeSmith> | I guess I need to get a newer version of pygments |
| 04:05 | <MikeSmith> | TabAtkins: testing this: |
| 04:05 | <MikeSmith> | html, css = highlighter.highlight(sys.stdin.read(), lang="html", output="json") |
| 04:05 | <MikeSmith> | print(html) |
| 04:05 | <MikeSmith> | ...with this input: |
| 04:06 | <MikeSmith> | ["pre",{"class": "idl extract"},"[Exposed=Window]\ninterface ",["dfn","Example"]," {\n // this is an IDL definition\n};"] |
| 04:06 | <MikeSmith> | ...I get only: |
| 04:06 | <MikeSmith> | <None></None> |
| 04:07 | <MikeSmith> | same thing if I test with the `["p", {"class":"foo"}, "text", ["span", {}, "nested text"]]` example from your README.md |
| 04:07 | <MikeSmith> | *correction: above I meant with output="html" |
| 04:08 | <MikeSmith> | with output="json" it just gives me back the exact same JSON as the input |
| 06:07 | <annevk> | jyasskin: not entirely true, an event handler adds an event listener and retains a pointer to the function that event listener will invoke; setting the event handler again replaces that function |
| 06:07 | <annevk> | so the event listener is constant, but the innards are not |
| 06:40 | <TabAtkins> | MikeSmith: that ends up not being valid webidl - the {} second argument isn't optional. |
| 06:40 | <domfarolino> | Is https://w3c.github.io/webappsec-referrer-policy/ down for anyone? |
| 06:41 | <TabAtkins> | And you're calling it with lang="html", too, which won't help - it's all naked text, which won't receive a highlight. |
| 06:42 | <TabAtkins> | (the <None></None> thing seems like a bug tho) |
| 06:48 | <annevk> | domfarolino: works here |
| 06:49 | <domfarolino> | sad face |
| 06:55 | <domfarolino> | annevk: By "we" you mean "callers" no? (https://github.com/whatwg/console/issues/57#issuecomment-391958300) |
| 06:55 | <annevk> | domfarolino: callers and the algorithm |
| 06:56 | <annevk> | domfarolino: I probably meant "us spec writers" |
| 06:56 | <annevk> | I should really try to avoid using "we"... |
| 06:57 | <domfarolino> | annevk: Right, I figured spec writers (callers) would provide something as generic as what we use in https://console.spec.whatwg.org/#time, and if the provided warning is left out, the algorithm uses something like you said, is generic and for the occasion |
| 07:00 | <annevk> | domfarolino: I guess it makes sense to allow something to be specified |
| 07:01 | <annevk> | domfarolino: just need to make it clear in the algorithm that a) such a thing is advisory b) might get localized and c) is optional |
| 07:01 | <domfarolino> | Makes sense, thanks |
| 07:16 | <domfarolino> | annevk: Does parser-inserted basically just mean not-dynamically-inserted (like, by a script)? |
| 07:17 | <annevk> | domfarolino: for <script>, yes |
| 07:17 | <annevk> | domfarolino: we don't keep such state around for other elements though |
| 07:17 | <domfarolino> | does this concept exist for other things/elementss? |
| 07:18 | <domfarolino> | Ok |
| 07:41 | <mkwst> | annevk: Skimming through https://github.com/whatwg/url/pull/72 again, I recall Ryan being in favor of just pointing to the PSL's algorithm for determining a domain's "public suffix" and/or "registrable domain". |
| 07:41 | <mkwst> | annevk: How would you feel about defining the terms in URL, but pointing to PSL for the implementation? |
| 07:42 | <mkwst> | annevk: There's more complexity in the PSL than there was when I initially put that patch together (they've added exception rules, for instance), and I'm not sure it's worth the effort to replicate everything in URL. |
| 07:43 | <annevk> | mkwst: I think pointing to PSL is fine and I agree we don't want to duplicate their algorithm, although I do have some issues with it |
| 07:44 | <mkwst> | annevk: Ok. I'll sketch something out today and send you a PR. |
| 07:44 | <annevk> | mkwst: the main thing I'm worried about is how domain names get normalized and what the exact string ends up being |
| 07:44 | <annevk> | mkwst: but hand-waving that and pointing to the open issue against PSL as well as what we expect with some examples seems good enough |
| 07:46 | <mkwst> | annevk: Ok. That makes sense to me, thanks. |
| 08:30 | <MikeSmith> | TabAtkins: I get that same <None></None> output regardles of what input I give it |
| 08:31 | <MikeSmith> | TabAtkins: e.g., even if I give it the `["p", {"class":"foo"}, "text", ["span", {}, "nested text"]]` example from the README.md |
| 08:33 | <MikeSmith> | $ echo '[ "pre", "<p>This <em>is <strong>correct</strong>.</em></p>" ]' | python2.7 highlight.py |
| 08:33 | <MikeSmith> | <None></None> |
| 08:33 | <MikeSmith> | $ cat highlight.py |
| 08:33 | <MikeSmith> | #!/usr/bin/python2.7 |
| 08:33 | <MikeSmith> | import highlighter |
| 08:33 | <MikeSmith> | import sys |
| 08:33 | <MikeSmith> | html, css = highlighter.highlight(sys.stdin.read(), lang="html", output="html") |
| 08:33 | <MikeSmith> | print(html) |
| 11:11 | <annevk> | mkwst: are you aware of any Origin-header-outside-of-CORS tests? |
| 11:11 | annevk | wants to test https://github.com/whatwg/fetch/issues/593 |
| 11:25 | <mkwst> | annevk: I don't know. Let me look in Blink. |
| 11:25 | <mkwst> | (That said, I know Blink still has some brokenness around redirects, so I'm not sure our tests will be helpful if we're passing them. :/) |
| 11:29 | <annevk> | Okay, I'm looking at writing my own now, but I haven't really dealt with stash before so we'll see how it goes... |
| 12:47 | <yoav> | annevk: when you have time I'd appreciate if you could take a look at https://github.com/whatwg/html/pull/3714 |
| 13:05 | <annevk> | mkwst: it looks like Blink does the correct thing with redirects |
| 13:05 | <annevk> | mkwst: it also looks like it's all alone (and I didn't test exhaustively) |
| 13:30 | <annevk> | yoav: I think both are important to be clear on, as it matters how implementations will align, right? |
| 13:30 | <annevk> | yoav: seems wanderview already gave a helpful example with regards to about:blank |
| 13:57 | <yoav> | yeah, it made our conversation from the other day on IRC click |
| 13:57 | <yoav> | added handling for about:blank as well |
| 15:59 | <domfarolino> | annevk: have you had a chance to peruse https://github.com/whatwg/meta/pull/89 ? |
| 16:11 | <annevk> | domfarolino: so who besides MDN will use this? |
| 16:11 | <annevk> | domfarolino: anyway, I guess it's fine; will you add it to repositories? |
| 16:12 | <annevk> | domfarolino: sorry for the delay |
| 16:12 | <domfarolino> | Absolutely no idea, but I figured if anyone did it might make sense to generalize? Though I see value in being specific too... |
| 16:12 | <domfarolino> | No worries. I’ll add to repositories (if I have access to do that?) |
| 16:16 | <annevk> | domfarolino: gave you access to HTML as a start |
| 16:17 | <annevk> | domfarolino: maybe next week I should work on my label script again |
| 16:25 | <domfarolino> | Thank you. Oh that’d be nice! |
| 16:26 | <domfarolino> | What kind of access to I have that is >= label access but < write access personally I didn’t know that middle-ground existed? |
| 16:31 | <annevk> | domfarolino: you have write access, but you cannot commit to master |
| 16:31 | <annevk> | domfarolino: it's not quite ideal, as ideally we'd also protect longstanding PRs from mistakes, but can't have it all I guess |
| 16:32 | <domfarolino> | Ohh, ok makes sense. Agreed |
| 17:00 | annevk | starts putting all labels into labels.json |