Closed Bug 1498369 Opened 7 years ago Closed 7 years ago

Propagate the user interaction flag through the resolve handler of the promise returned from hasStorageAccess as well

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

In addition to bug 1491403, there is another case for us to handle, I think. What if someone has code like this: onclick="foo()" function foo() { document.hasStorageAccess() .then(success => { if (!success) { return document.requestStorageAccess(); } }); } In this case, the call to requestStorageAccess() will break because the resolve handler will have lost the user interaction flag by the time that it runs.
Blocks: 1469714
Priority: -- → P2
Priority: P2 → P3
All this stuff depends on the user activation model we want. Google is proposing the very simple model, but I'm not sure how well that will work. https://mustaqahmed.github.io/user-activation-v2/ is some version of that.
Yes indeed. Note that this is just an extension of the special hack we're adding for the storage access API while a general solution is being figured out.
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a58c07d9a7fa Ensure the promise returned from Document.hasStorageAccess() will propagate user activation r=baku
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: