Closed
Bug 1176442
Opened 9 years ago
Closed 6 years ago
Convert Web Manifest to Web IDL dictionary
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox41 | --- | affected |
People
(Reporter: marcosc, Unassigned)
References
(Blocks 1 open bug)
Details
Elsewhere, Bobby said: "manifest looks like it would be well-served by a type-safe WebIDL dictionary - is there any reason you're not using webidl here?"
Reporter | ||
Comment 1•9 years ago
|
||
Main reason was that it's not exposed to web content. But I would be happy to convert it to WebIDL. Do you have any examples of people doing similar things?
Flags: needinfo?(bobbyholley)
Comment 2•9 years ago
|
||
(In reply to Marcos Caceres [:marcosc] from comment #1)
> Main reason was that it's not exposed to web content.
Given the Xray troubles you were having, it's presumably exposed to _some_ kind of untrusted content.
> But I would be happy
> to convert it to WebIDL. Do you have any examples of people doing similar
> things?
I'd start here? https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Implementing_WebIDL_using_Javascript
The Dictionary is the easy part - the more involved part will be designing your API such that it is expressed in WebIDL, which lets you give the arguments strong types (i.e. your dictionary).
Flags: needinfo?(bobbyholley)
Reporter | ||
Comment 3•9 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #2)
> (In reply to Marcos Caceres [:marcosc] from comment #1)
> > Main reason was that it's not exposed to web content.
>
> Given the Xray troubles you were having, it's presumably exposed to _some_
> kind of untrusted content.
No, I was having e10s grief with message passing (which for whatever reason cloneInto() fixed... but then it caused the other problems I was having). I fixed that now ^_^.
> > But I would be happy
> > to convert it to WebIDL. Do you have any examples of people doing similar
> > things?
>
> I'd start here?
> https://developer.mozilla.org/en-US/docs/Mozilla/
> WebIDL_bindings#Implementing_WebIDL_using_Javascript
>
> The Dictionary is the easy part - the more involved part will be designing
> your API such that it is expressed in WebIDL, which lets you give the
> arguments strong types (i.e. your dictionary).
Ok, thanks for the pointer. I'll see about shifting over.
Reporter | ||
Updated•9 years ago
|
Blocks: webmanifest
Reporter | ||
Comment 4•9 years ago
|
||
Putting this here for now... will add it to dom/webidl/ soon.
```
dictionary WebManifest {
DOMString description;
TextDirection dir;
DisplayMode display;
DOMString lang;
DOMString name;
OrientationLockType orientation;
USVString scope;
DOMString short_name;
USVString start_url;
}
enum TextDirection {
"rtl",
"ltr",
"auto",
}
enum DisplayMode {
"browser",
"fullscreen",
"minimal-ui",
"standalone",
}
```
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → mcaceres
Reporter | ||
Updated•6 years ago
|
Assignee: mcaceres → nobody
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Reporter | ||
Comment 5•6 years ago
|
||
We tried this, but it doesn't work in practice... the manifest allows for string case variants that don't map well to enums, for example. Also, the manifest is really a data format, and WebIDL is an interface definition format.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•