| 08:43 | <AryehGregor> | Challenge: come up with as many web APIs as possible that accept a string to identify a particular desired feature, and do nothing (either throw or silently fail or whatnot) if the specific feature is unsupported. Examples: getContext(), setProperty(), execCommand(). |
| 08:43 | <AryehGregor> | How many others? |
| 08:45 | <annevk> | responseType |
| 08:46 | <annevk> | hasFeature |
| 08:46 | <annevk> | createElement ... |
| 08:46 | <AryehGregor> | Context: https://bugs.webkit.org/show_bug.cgi?id=83993 |
| 08:47 | <AryehGregor> | The question at had is, is it more consistent for execCommand() to throw or return false if a command is unrecognized? |
| 08:47 | <AryehGregor> | Ehsan and I argue it should throw (IE/Opera behavior), Alexey thinks it should not (Gecko/WebKit behavior). |
| 08:47 | <AryehGregor> | createElement() works fine if the element is unrecognized. |
| 08:48 | <Ms2ger> | What about execCommand("stop")? |
| 08:48 | <annevk> | the object you get back might not have the properties you expect |
| 08:48 | <AryehGregor> | Ms2ger, what? |
| 08:48 | <annevk> | typically non-throwing is preferred when there's a choice |
| 08:48 | <annevk> | e.g. I think if you ask sicking he'd argue to not throw too |
| 08:49 | <AryehGregor> | If we did throw, we'd have to whitelist various IE-specific commands as no-ops for compat. |
| 08:51 | <AryehGregor> | What happens if you set .responseType to an unsupported value? |
| 08:51 | AryehGregor | doesn't know what this "enum" stuff means |
| 08:52 | <Ms2ger> | Throw when passing to a method, silently ignore when setting an attribute |
| 08:54 | <AryehGregor> | Any other opinions on whether we should throw or not? |
| 08:54 | <AryehGregor> | Trying to use most unsupported features will throw, e.g., if they're new methods. |
| 08:55 | <annevk> | AryehGregor: not throwing seems better |
| 08:56 | <annevk> | in particular https://bugs.webkit.org/show_bug.cgi?id=83993#c7 is the argument we've made throwing/non-throwing decisions by time and again and I don't really see how this case is different |
| 08:59 | <AryehGregor> | Okay. Any other opinions? |
| 09:26 | <gsnedders> | But how do you detect if a browser supports the string passed to it? |
| 09:26 | gsnedders | is in favour of throwing, as these are edge-cases that nobody should be hitting |
| 09:27 | <AryehGregor> | gsnedders, document.queryCommandSupported("mystring"). |
| 09:27 | <AryehGregor> | Also: they're not edge-cases, because different browsers support totally different command sets and we're introducing new ones over time. |
| 09:28 | <AryehGregor> | So it's not an unlikely occurrence. |
| 09:28 | <gsnedders> | Ah. And given Gecko/WebKit don't throw, probably people passing bogus strings in today. |
| 09:28 | <AryehGregor> | In particular, throwing for all unsupported commands would almost surely break the web for non-IE browsers, because there are many IE-specific commands like ClearAuthenticationCache that no one else supports. These would have to be special-cased as no-ops. |
| 09:29 | <AryehGregor> | Bogus strings, or just IE-specific ones. |
| 09:29 | <AryehGregor> | But Gecko and WebKit have a decent selection of commands that only they support, too. |
| 09:29 | <gsnedders> | What do we do for the IE-specific commands? |
| 09:30 | <AryehGregor> | "we" as in Opera? I don't know. Maybe you just throw and pages break. |
| 09:31 | <AryehGregor> | I don't know how many pages it is. |
| 09:32 | <AryehGregor> | Does Opera throw at all for unrecognized commands? I thought it did, but it seems not. |
| 09:32 | <AryehGregor> | So that seems to answer the question. |
| 09:33 | <gsnedders> | Then if only IE throws, then I think we have interop and it's obvious what to do. |
| 09:33 | <AryehGregor> | Namely not throw, yes. |
| 13:45 | <zewt> | sdf |
| 15:13 | <AryehGregor> | Exciting -- there's a box that somehow broke off from Chrome and is now sitting on top of all other windows, and I can't get rid of it. |
| 15:13 | <AryehGregor> | It stays put when I switch programs or workspaces, and doesn't respond to xkill. |
| 15:13 | <AryehGregor> | Isn't Linux fun? |
| 15:14 | AryehGregor | tries to figure out how to get rid of it without restarting X |
| 15:18 | <AryehGregor> | So xwininfo let me know that it was 0x3c37323, and then xkill -i 0x3c37323 killed it. |
| 15:18 | <AryehGregor> | Along with Chrome. |
| 15:18 | <AryehGregor> | Oh well. |
| 15:18 | <AryehGregor> | I should have restarted Chrome long ago anyway, it updated itself like a million times. |
| 18:33 | <gsnedders> | jgraham: Why does test_serializer.py give errors? |
| 18:34 | <Ms2ger> | And what's http://hg.csswg.org/dev/w3ctestlib/file/tip/Utils.py#l145 trying to do? |
| 18:35 | <gsnedders> | Ms2ger: What's confusing about that? |
| 18:35 | <Ms2ger> | The exception it throws at me |
| 18:35 | <Ms2ger> | text = text.replace(c, "&%s;" % entityify[c.encode('Latin-1', 'xmlcharrefreplace')]) |
| 18:35 | <Ms2ger> | KeyError: 'Ă' |
| 18:41 | <gsnedders> | Good question what that's doing looking at it again. |
| 21:23 | <jgraham> | Ms2ger: well it's not that surprising it throws |
| 21:24 | <jgraham> | Presumably entityify doesn't have 'Ă' as a member |
| 21:25 | <jgraham> | Indeed it doesn't |
| 21:26 | <jgraham> | Seems pretty broken to me |
| 21:26 | <jgraham> | gsnedders: I don't know. What errors does it give? |