amp-bind: verify warning improvements#9103
Merged
kmh287 merged 3 commits intoampproject:masterfrom May 9, 2017
Merged
Conversation
Contributor
Author
dreamofabear
approved these changes
May 9, 2017
extensions/amp-bind/0.1/bind-impl.js
Outdated
|
|
||
| // Don't show a warning for bind-only attributes, | ||
| // like 'slide' on amp-carousel. | ||
| const bindOnlyAttrs = BIND_ONLY_ATTRIBUTES[element.tagName.toLowerCase()]; |
There was a problem hiding this comment.
You can avoid toLowerCase by uppercasing the map keys.
extensions/amp-bind/0.1/bind-impl.js
Outdated
| */ | ||
| let BoundElementDef; | ||
|
|
||
| /** @private {!Object<string, !Array<string>>} */ |
There was a problem hiding this comment.
Can you add a short description for this map?
1bd0ce4 to
f140f64
Compare
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.
When #development=1, we shouldn't warn users that bind attributes don't match their non-bind counterparts when non-bind counterparts aren't valid AMP attributes. For instance,
amp-carouselsupports the[slide]bind attribute, but does not support a non-bindslideattribute.Fixes #8933
/to @choumx