Web Manifest: Implement window.oninstall

RESOLVED FIXED in Firefox 49

Status

()

RESOLVED FIXED
3 years ago
5 days ago

People

(Reporter: marcosc, Assigned: marcosc)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

unspecified
mozilla49
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed)

Details

(Whiteboard: btpp-active, URL)

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

3 years ago
Implement the window.oninstall event handler attribute.
(Assignee)

Updated

3 years ago
Blocks: 997779
Whiteboard: btpp-fixlater
(Assignee)

Updated

3 years ago
Assignee: nobody → mcaceres
(Assignee)

Comment 1

3 years ago
Baku, does this look ok? The event is supposed to be fired by the user agent when a "progressive web app" is successfully installed somewhere (e.g., user's homescreen on a mobile device).
Attachment #8753751 - Flags: feedback?(amarchesini)
Comment on attachment 8753751 [details] [diff] [review]
0001-Bug-1265279-Web-Manifest-Implement-window.oninstall.patch

Review of attachment 8753751 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/ipc/manifestMessages.js
@@ +69,5 @@
> +    const ev = new Event("install");
> +    const response = makeMsgResponse(id);
> +    if (!content || content.top !== content) {
> +      let msg = "Can only dispatch install event on top-level browsing contexts.";
> +      response.result = serializeError(new Error(msg));

should we localize this error message?
Attachment #8753751 - Flags: feedback?(bugs)
Attachment #8753751 - Flags: feedback?(amarchesini)
Attachment #8753751 - Flags: feedback+
Attachment #8753751 - Flags: feedback?(bugs) → feedback+
(Assignee)

Comment 3

3 years ago
(In reply to Andrea Marchesini (:baku) from comment #2)
> Comment on attachment 8753751 [details] [diff] [review]
> 0001-Bug-1265279-Web-Manifest-Implement-window.oninstall.patch
> 
> Review of attachment 8753751 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/ipc/manifestMessages.js
> @@ +69,5 @@
> > +    const ev = new Event("install");
> > +    const response = makeMsgResponse(id);
> > +    if (!content || content.top !== content) {
> > +      let msg = "Can only dispatch install event on top-level browsing contexts.";
> > +      response.result = serializeError(new Error(msg));
> 
> should we localize this error message?

Right now, the error would only be used internally so I don't think it's necessary.
(Assignee)

Comment 4

3 years ago
Attachment #8753751 - Attachment is obsolete: true
Attachment #8755314 - Flags: review?(amarchesini)
(Assignee)

Comment 7

3 years ago
... no idea why it worked for me locally... mochitests are gross.
Attachment #8755314 - Attachment is obsolete: true
Attachment #8755314 - Flags: review?(amarchesini)
Attachment #8755683 - Flags: review?(amarchesini)
Whiteboard: btpp-fixlater → btpp-active
Attachment #8755683 - Flags: review?(amarchesini) → review+
(Assignee)

Comment 9

3 years ago
Attachment #8755683 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Comment 11

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9143e6d98cdf
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Keywords: dev-doc-needed
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.