Skip to content

Add a way to render html strings inside element in jsx components #9

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

Closed
mairatma opened this issue Jul 5, 2016 · 2 comments
Closed

Comments

@mairatma
Copy link
Owner

mairatma commented Jul 5, 2016

From @mairatma on June 10, 2016 18:54

It's currently possible to render html strings via Metal.js soy components, but not via jsx components.

This was requested by @mthadley and @bryceosterhaus. Today they're going around this by using incremental dom directly, like this.

Copied from original issue: metal/metal.js#127

@mairatma
Copy link
Owner Author

mairatma commented Jul 5, 2016

From @mthadley on June 13, 2016 16:28

For ease of reference:

render() {
  IncrementalDOM.elementOpen('div', null, null, 'class', 'my-html-string-container');
  const node = IncrementalDOM.elementClose('div');
  node.innerHTML = '<div class="my-html-string">Hello World!</div>';
  return node;
}

@mairatma
Copy link
Owner Author

This issue was moved to metal/metal.js#127.

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

No branches or pull requests

1 participant