Re: [w3c/manifest] Feat(events): add BeforeInstallPromptEvent (#520)

@domenic wrote, 
> I'm a bit unclear why the promise fulfills with an object which is just a wrapper around userChoice, instead of with userChoice directly. Maybe it's future extensibility.

Yeah, it's for extensibility: The (non-standard) Chrome implementation currently has additional information being returned (e.g., "platforms", which could be "Web, Play Store,"), but we are still discussing if that will be included. It's likely we will add more things. 

> All the internal slots have an extra slash in them in the rendered output.

Will fix. 

> The constructor is a bit troublesome, since events all share the same constructor logic in most implementations, namely https://dom.spec.whatwg.org/#constructing-events. Maybe that logic needs to move to the prompt method? That seems like it will change things a decent bit.

Ah, yeah. Although the .prompt() logic can probably stay the same, and I can just remove the constructor prose. The internal slots can be set as private instance properties without involvement of the constructor (i.e., they are an implementation detail in a sense). 

> "request to present an install prompt" isn't cross-linking correctly.

Fixing.

> When referring to internal slots, it seems better to use obj.[[slotName]] notation. Currently obj is missing, which is a bit confusing since it differs: in prompt() it should be this, whereas in "request to present an install prompt" it should be event, I think.

Fixing. 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/520#issuecomment-259578381

Received on Thursday, 10 November 2016 01:37:00 UTC