Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose add-to-homescreen options #87

Open
caseywatts opened this issue Nov 19, 2017 · 4 comments
Open

Expose add-to-homescreen options #87

caseywatts opened this issue Nov 19, 2017 · 4 comments

Comments

@caseywatts
Copy link
Contributor

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
Copy link
Contributor Author

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~

@mike-north
Copy link
Owner

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.

@caseywatts
Copy link
Contributor Author

I like option 1 :)

I might poke at this again in a week or two

@JonRossway
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants