Created
December 6, 2014 20:00
-
-
Save montyr75/2078bdc941d22ab0d131 to your computer and use it in GitHub Desktop.
Dynamically create an HTML element from a String in Dart.
This file contains 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
new Element.html("YOUR HTML STRING HERE"); | |
// You may need to pass a NodeValidator to get everything to render, like: | |
NodeValidator nodeValidator = new NodeValidatorBuilder() | |
..allowTextElements(); | |
// ..allowHtml5() | |
// ..allowElement('Button', attributes: ['ng-disabled']); | |
new Element.html("YOUR HTML STRING HERE", validator: nodeValidator); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment