mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Merge branch 'master' into 2016
This commit is contained in:
commit
8fad5b1b16
1 changed files with 10 additions and 6 deletions
|
@ -64,12 +64,16 @@ Blockly.inject = function(container, opt_options) {
|
|||
*/
|
||||
Blockly.parseToolboxTree_ = function(tree) {
|
||||
if (tree) {
|
||||
if (typeof tree != 'string' && typeof XSLTProcessor == 'undefined') {
|
||||
// In this case the tree will not have been properly built by the
|
||||
// browser. The HTML will be contained in the element, but it will
|
||||
// not have the proper DOM structure since the browser doesn't support
|
||||
// XSLTProcessor (XML -> HTML). This is the case in IE 9+.
|
||||
tree = tree.outerHTML;
|
||||
if (typeof tree != 'string') {
|
||||
if (typeof XSLTProcessor == 'undefined' && tree.outerHTML) {
|
||||
// In this case the tree will not have been properly built by the
|
||||
// browser. The HTML will be contained in the element, but it will
|
||||
// not have the proper DOM structure since the browser doesn't support
|
||||
// XSLTProcessor (XML -> HTML). This is the case in IE 9+.
|
||||
tree = tree.outerHTML;
|
||||
} else if (!(tree instanceof Element)) {
|
||||
tree = null;
|
||||
}
|
||||
}
|
||||
if (typeof tree == 'string') {
|
||||
tree = Blockly.Xml.textToDom(tree);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue