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

Fully automatic initializer #2

Open
rdmurphy opened this issue Jan 2, 2019 · 2 comments
Open

Fully automatic initializer #2

rdmurphy opened this issue Jan 2, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@rdmurphy
Copy link
Owner

rdmurphy commented Jan 2, 2019

One cool feature of Pym was that you could just load the library and it'd do the auto initialization without an explicit call. It was purposively left out of this to ensure no surprises (and to keep tree shaking functional), but it'd be cool to be able to import a specific version of the library that did do this.

import `@newswire/frames/auto`;

And...

<script src="https://unpkg.com/@newswire/frames/auto.js"></script>
<!-- or -->
<script src="https://unpkg.com/@newswire/frames/auto/index.js"></script>
@rdmurphy rdmurphy added the enhancement New feature or request label Jan 2, 2019
@NathanLawrence
Copy link

This would be the feature that would let NPR stations use Frames, as we have no control over the CMS and script tags pulling from other sites are allowed, but script tags with content inside them are scrubbed. I'd love to potentially help make this happen.

@rdmurphy
Copy link
Owner Author

rdmurphy commented May 9, 2019

Hey @NathanLawrence! Agreed. I've had a few drafts of this floating around and I'm game to finally push one over the edge!

How would you imagine it'd be best to use it? Are you looking for a Pym like experience where you could just point at a hosted version and go? Or do you think you'd have it hosted somewhere on your end?

I'm also assuming in your use case you wouldn't ever expect to interact with frames on the page, right? This is been (somewhat) what has held me up — whether folks expect to be able to interact with frames in the auto-initialized mode.

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

No branches or pull requests

2 participants