-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🍱 [amp-app-banner:1.0] Ensure Bento utilities are document-scoped #37465
Comments
Before working on this, I would like to establish a better understanding of the requirements.
Once this is done, we can establish a pattern to ensure the correct document scope is respected. |
For reference, here's a branch that contains some FIE examples: 1bd121aa66 This commit also contains an example of the "Service Injection" approach, which is done via |
Some thoughts on how to solve this document-scope problem: Service InjectionWe use AMP services when in AMP mode, and use a fallback "standalone" service when in Bento mode.
Pros:
|
Creating document-scoped utilitiesInstead of creating a dependency between Bento and AMP services, we could ensure our new "utilities" can handle document-scoping themselves. The component can retrieve the
Pros:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
As discussed in ampproject/bento#5, in order for Bento components to work correctly in an AMP document, they should not use the global
document
, but instead should reference the web-component'sownerDocument
.These 2 PRs are currently using utilities with a globally-scoped
document
, and should be improved to use the proper doc scope:bento-app-banner
#37127The text was updated successfully, but these errors were encountered: