ember-add-to-homescreen icon indicating copy to clipboard operation
ember-add-to-homescreen copied to clipboard

Expose add-to-homescreen options

Open caseywatts opened this issue 6 years ago • 4 comments

options are listed here: http://cubiq.org/add-to-home-screen

Hopefully there's a way we can implement this that doesn't depend on maintaining a whitelist of options in our app. Maybe we accept an options hash that we pass directly to window.addToHomeScreen here?

caseywatts avatar Nov 19 '17 22:11 caseywatts

ooh! or could this be exposed by mentioning in the readme that users can call window.addToHomescreen({ debug: false });? The component doesn't include much other than that~

caseywatts avatar Nov 19 '17 22:11 caseywatts

I'd prefer we encourage people to use the component -- mainly for fastboot compatibility, and insulating users from having to worry about server vs client rendering too much.

This would be fine with me. We can avoid the "whitelist of options" by using this.attrs from within the component -- passing the whole thing to the addToHomescreen call.

   {{add-to-homescreen
        startDelay=5 }}

Or if you feel there's value in passing a cohesive options object in as opposed to discrete properties

   {{add-to-homescreen
       options=(hash
          startDelay=5
       )
   }}

Any readme improvements in the spirit of gently nudging users to use the component rather than explicit window.addToHomescreen() calls would be welcome.

mike-north avatar Nov 20 '17 08:11 mike-north

I like option 1 :)

I might poke at this again in a week or two

caseywatts avatar Nov 29 '17 20:11 caseywatts

The link with the options has expired; I'm looking to customize the verbiage for iPad users, is there an example that could help?

JonRossway avatar Sep 30 '19 15:09 JonRossway