Created
July 26, 2013 23:19
-
-
Save heyjinkim/6092882 to your computer and use it in GitHub Desktop.
Trying to fix 'Uncaught NotSupportedError' error with SVG elements in Ember template.
Added "range.selectNode(range.startContainer);" on line 11.
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
htmlFunc = function(html, outerToo) { | |
// get a range for the current metamorph object | |
var range = rangeFor(this, outerToo); | |
// delete the contents of the range, which will be the | |
// nodes between the starting and ending placeholder. | |
range.deleteContents(); | |
/* Heyjin added this line. *************************/ | |
range.selectNode(range.startContainer); | |
/***************************************************/ | |
// create a new document fragment for the HTML | |
var fragment = range.createContextualFragment(html); | |
// insert the fragment into the range | |
range.insertNode(fragment); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment