amp-state ids collide with reserved words when called from amp-list template
See original GitHub issueWhat’s the issue?
amp-state
ids collide with reserved words when called from amp-list template
How do we reproduce the issue?
- Create an
amp-state
with an id offormData
- Attempt to do anything that calls
AMP.setState
onformData
from within anamp-list
andtemplate
component
What browsers are affected?
Only tested in Chrome and Safari
Which AMP version is affected?
1516833286380
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
javascript - Using reserved words as property names, revisited
In ECMAScript, starting from ES5, reserved words may be used as object property names "in the buff". This means that they don't need...
Read more >Reserved keywords - Amazon Athena - AWS Documentation
Athena uses the following list of reserved keywords in SQL SELECT statements and in queries on views. If you use these keywords as...
Read more >Documentation: <amp-list> - amp.dev
Dynamically downloads data and creates list items using a template. ... The amp-list component fetches dynamic content from a CORS JSON endpoint.
Read more >How to name something when the logical option is a reserved ...
For an enum option you should use title case like Default . Since C# is case-sensitive it will not collide with the reserved...
Read more >Reserved schema names and reserved words - IBM
In such cases, the word must be specified as a delimited identifier. For example, COUNT cannot be used as a column name in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @choumx for looking into this. Warning/error on console would be great - this is super frustrating to debug otherwise.
This is where the
on
attribute gets stripped (and where we should add a user warning/error): https://github.com/ampproject/amphtml/blob/0cef5ae4ca934faa212fd09a485519430dbf6499/src/sanitizer.js#L380-L387You can check the element inspector of Chrome devtools to see.