New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658639 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

BeforeInstallPromptEvent: throw NotAllowedError instead of InvalidStateError if untrusted

Project Member Reported by mgiuca@chromium.org, Oct 24 2016

Issue description

Version: 56
OS: Android

What steps will reproduce the problem?
const e = new BeforeInstallPromptEvent("");
try {
    e.prompt();
    console.assert(false);
} catch (err) {
    console.assert(err instanceof DOMException);
    console.assert(err.name === "NotAllowedError");
}

Source: https://github.com/w3c/manifest/pull/506/files

What is the expected output?
Asserts pass (because it throws NotAllowedError).

This is the error type going into the new spec, so we should follow that.

What do you see instead?
It throws InvalidStateError.

(Also it rejects, rather than throwing, but I filed a separate bug for that:  Issue 658638 .)
 

Comment 1 by mgiuca@chromium.org, Oct 24 2016

Labels: OS-Android

Comment 2 by mgiuca@chromium.org, May 10 2017

Status: WontFix (was: Assigned)
I misread this. A previous spec draft *called for* it to throw InvalidStateError (matching Chrome's behaviour). But this text never made it into the spec:
https://github.com/w3c/manifest/issues/577

So we are still not spec compliant, but in a different way. I'll close this and open a new bug depending on the outcome of #577.

Sign in to add a comment