Should we have a case-sensitive `as` attribute?

35 views
Skip to first unread message

Yoav Weiss

unread,
Dec 16, 2016, 11:22:13 AM12/16/16
to blink-dev, dom...@chromium.org, Elliott Sprehn, Philip Jägenstedt
When `<link rel=preload>` was integrated into the HTML spec, the `as` attribute was changed to be case-sensitive, meaning that something like `<link rel=preload as=Script>` would fail to parse and would trigger no request.

domenic@ opened an issue calling out this weird and uncommon (even if apparently not unprecedented) behavior for the attribute, but folks on that issue were not able to reach agreement. esprehn@ and foolip@ participated on the issue, objecting to the specced behavior.

Currently implemented behavior is not aligned with the spec on that, and `as` is parsed in a case-insensitive way.

Blink is currently the only rendering engine shipping preload, so there are no compatibility issues involved. (WebKit's implementation, still behind a flag, disagrees with the spec as well)

Does anyone here have strong arguments in favor of us aligning our implementation with the spec?  


PhistucK

unread,
Dec 16, 2016, 4:00:19 PM12/16/16
to Yoav Weiss, blink-dev, dom...@chromium.org, Elliott Sprehn, Philip Jägenstedt

On Fri, Dec 16, 2016 at 6:21 PM, Yoav Weiss <yo...@yoav.ws> wrote:
so there are no compatibility issues involved

​You mean, interoperability (with other browsers), right?
Compatibility (with existing websites) issues may be involved.



PhistucK

Yoav Weiss

unread,
Dec 16, 2016, 4:13:52 PM12/16/16
to PhistucK, blink-dev, dom...@chromium.org, Elliott Sprehn, Philip Jägenstedt

Interoperability

Elliott Sprehn

unread,
Dec 16, 2016, 4:35:44 PM12/16/16
to Yoav Weiss, blink-dev, Domenic Denicola, Philip Jägenstedt
WebKit is case-insensitive? Also my understanding was that the conclusion on that bug was that *all* new specs were going to use case-sensitive attributes?

I do still think this is strange (since the other things on meta are all case-insensitive), but we have a couple other random case-sensitive attributes in the DOM as well. It's probably harder to make something case sensitive in the future than it is to relax it today, so I'd say if WebKit is willing to change we should match the spec.

foolip@ What's your feeling on this?

- E

Yoav Weiss

unread,
Jan 9, 2017, 2:03:24 AM1/9/17
to Elliott Sprehn, blink-dev, Domenic Denicola, Philip Jägenstedt
foolip@ - friendly ping :)

Philip Jägenstedt

unread,
Feb 14, 2017, 8:46:07 AM2/14/17
to Yoav Weiss, Elliott Sprehn, cdu...@apple.com, blink-dev, Domenic Denicola
This is how long it takes me to recover from inbox overload :)

I'm pretty much in agreement with Elliott here, if you would like to keep this as case-sensitive in Blink and argue for that behavior spec-side as well, I think that sounds good. WebKit seems like the biggest question here, so chat with +Chris Dumez to figure out a path forward?

Chris Dumez

unread,
Feb 14, 2017, 11:55:24 AM2/14/17
to Philip Jägenstedt, Yoav Weiss, Elliott Sprehn, blink-dev, Domenic Denicola
Hi,

Did you mean that you’d like to keep this as *case-insensitive* in Blink? You said the opposite.
I’d personally prefer to keep it ASCII case-insensitive in WebKit as commented on https://github.com/whatwg/html/issues/1665.

Cheers,
--
 Chris Dumez



Philip Jägenstedt

unread,
Feb 14, 2017, 12:14:16 PM2/14/17
to Chris Dumez, Yoav Weiss, Elliott Sprehn, blink-dev, Domenic Denicola
Yes, sorry, I typo'd :)
Reply all
Reply to author
Forward
0 new messages