amp-bind: Only primitives for object literal keys #7582
Merged
dreamofabear merged 2 commits intoampproject:masterfrom Feb 21, 2017
Merged
amp-bind: Only primitives for object literal keys #7582dreamofabear merged 2 commits intoampproject:masterfrom
dreamofabear merged 2 commits intoampproject:masterfrom
Conversation
f0dffcf to
68e0d99
Compare
jridgewell
approved these changes
Feb 15, 2017
mrjoro
pushed a commit
to mrjoro/amphtml
that referenced
this pull request
Apr 28, 2017
* initial commit to forbid exprs in obj keys * also support numbers and other primitives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #7399.
{1+1: 'abc'}.Originally thought "why not", but realized this will be confusing for users once we support object literals in
AMP.setState()(#7573).Specifically, users will probably conflate
with
when actually it will evaluate to current value of
foo.bar.Separately, perhaps we should support the above behavior for user convenience. Will follow up in a separate PR since that's a larger change.
/to @jridgewell @kmh287 /cc @kul3r4