UTTypeCopyPreferredTagWithClass for JavaScript source returns obsolete text/javascript as its MIME type

Number:rdar://7437299 Date Originated:10-Nov-2019 00:06 AM
Status:Open Resolved:
Product:macOS Product Version:
Classification:Suggestion Reproducible:Yes
## Problem

The following Swift snippet prints `text/javascript`.

print(UTTypeCopyPreferredTagWithClass("com.netscape.javascript-source" as CFString, kUTTagClassMimeType)!.takeRetainedValue())

According to https://tools.ietf.org/html/rfc4329#page-9, `text/javascript` has been obsoleted and `application/javascript` is declared instead.

It's been a while since RFC 4329 was published and nowadays the most of browsers support `application/javascript` so please consider to migrate to the new one.


The actual issue number is FB7437299 but it seems like Open Rader doesn't accept new Feedback Assistant's bug tracking number so I removed the first non-digit letters FB and set the reset digits as the number of the issue.

By rito.0305 at Nov. 9, 2019, 3:08 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!