Re: [w3c/DOM-Parsing] parseFromString() should be use case-insensitive MIME type matching (#40)

> Well, now it can be an enum: https://w3c.github.io/DOM-Parsing/#the-domparser-interface. There's no ASCII-case-insensitive enums. It's also seen as a somewhat legacy API so I'm not sure it makes sense to complicate things here.

I see. It seems ridiculous that this API case-sensitively matches MIME type based on the definition of MIME type. I haven't checked Edge, but Mac Chrome Canary Version 74.0.3686.0, Mac Firefox 64.0.2, Safari Version 12.0 (14606.1.36.1.2) seems to be unhappy and throw an exception when I tried to evaluate:

`(new DOMParser).parseFromString("<h1>Hello</h1>", "text/HTML")`

So, there is agreement in case-sensitively matching the MIME type passed to parseFromString() :/

Still have this question:

>  Did browsers botch this for this Web API? 

And another: Why did browsers vendors choose to perform case-sensitive matching? Was this fall out from use of WebIDL enum? Did WebIDL enum exist at the time this API was first introduced?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/40#issuecomment-458217744

Received on Monday, 28 January 2019 17:11:06 UTC