Open Bug 1632290 Opened 5 years ago Updated 9 months ago

Expose XPIDL JS interface of MIMEType

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

People

(Reporter: marcosc, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

It would be nice to have a JS interface for MIMEType.h/cpp. The current MIMEType parser exposed to chrome scripts doesn't validate mime types. What is important would be to have a way of accessing the MIME parser.

We need roughly something like this (WebIDL):

[ChromeOnly]
interface MIMEType {
  constructor(DOMString input);
  readonly attribute DOMString essence;
  readonly attribute DOMString type;
  readonly attribute DOMString subtype;
  readonly attribute MIMEParams params;
}
[ChromeOnly]
interface MIMEParams {
  readonly maplike<DOMString, DOMString>;
}
Blocks: 1626158
Depends on: 1632313

Hi Thomas, any chance we could get this on your backlog?

Flags: needinfo?(twisniewski)

Yes, though probably not until next week at the soonest. I take it this effectively inherits the P2 priority of bug 1626158?

Flags: needinfo?(twisniewski) → needinfo?(mcaceres)

Yeah, basically. Then after that I can hook up the abandoned patch from bug 1626158.

Flags: needinfo?(mcaceres)
Severity: -- → S3

:jjaschke, are we still interested in this? If so, I should be able to finally put together a patch for this soon. But it's been a few years, so I thought I'd ask in case bug 1626158 isn't really P2 anymore.

Flags: needinfo?(jjaschke)
Flags: needinfo?(jjaschke) → needinfo?(hsivonen)

Sorry, I don't know enough about the context around bug 1626158 to say if it makes sense to have a JS interface for the MIME type.

Flags: needinfo?(hsivonen)
You need to log in before you can comment on or make changes to this bug.