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

Rewrite attribute handling to always avoid IE/Edge value parsing and rewriting #640

Merged
merged 7 commits into from
Nov 28, 2018

Conversation

justinfagnani
Copy link
Collaborator

Fixes #594

This changes attribute handling pretty significantly. First, it always rewrites attributes now. We could add back the conditional to only rewrite on Edge. Second, it removes the isTextBinding check, and instead relies on the lastAttributeNameRegex check to tell us if an expression is in a text position. I was a bit worried about this regex matching for non-attribute cases, but not of the tests fail. I'll try to come up with some more cases to make sure.

@frankiefu, @keanulee, and @azakus it'd be awesome to try this branch with more real-world templates like we have in PWASK and MWC, if you have a chance to do that.

@keanulee
Copy link
Contributor

Tested with pwa-starter-kit on Chrome/Edge/IE; didn't run into any obvious issues.

Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main blocking item is the qq about why the parsing may expect an attribute suffix already in the strings.

src/lib/template-result.ts Outdated Show resolved Hide resolved
src/lib/template-result.ts Outdated Show resolved Hide resolved
@justinfagnani
Copy link
Collaborator Author

@kevinpschaaf PTAL

Copy link
Member

@kevinpschaaf kevinpschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after adding the suggested clarifications in comments.

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

Successfully merging this pull request may close these issues.

3 participants