Skip to content

Remove usage of innerHTML for constant templates#11633

Merged
alanorozco merged 4 commits intoampproject:masterfrom
alanorozco:no-inner-html
Oct 11, 2017
Merged

Remove usage of innerHTML for constant templates#11633
alanorozco merged 4 commits intoampproject:masterfrom
alanorozco:no-inner-html

Conversation

@alanorozco
Copy link
Copy Markdown
Member

Fixes #11545

Copy link
Copy Markdown
Contributor

@newmuis newmuis left a comment

Choose a reason for hiding this comment

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

This is really useful for creating deep, complex, static DOM trees without innerHTML. /cc @dvoytenko is this something that is useful more generally in AMP?

@dreamofabear
Copy link
Copy Markdown

My 2c: probably not since most AMP components aren't as opinionated about layout/design as amp-story. We can easily extract functions into the main runtime if needed though.

@alanorozco
Copy link
Copy Markdown
Member Author

@newmuis @choumx

Could be useful for components with complex DOM trees, such as amp-image-lightbox.

@alanorozco alanorozco merged commit 743ec8f into ampproject:master Oct 11, 2017
@alanorozco alanorozco deleted the no-inner-html branch October 11, 2017 18:43
neko-fire pushed a commit to 3qnexx/amphtml that referenced this pull request Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants