Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
dc1f03a1
Commit
dc1f03a1
authored
Jan 08, 2016
by
Neil Fraser
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #231 from carlosperate/toolbox_nodes
Allow XML DOM nodes to be injected as toolbox in IE
parents
b1b96e45
bda78da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
core/inject.js
core/inject.js
+10
-6
No files found.
core/inject.js
View file @
dc1f03a1
...
@@ -64,12 +64,16 @@ Blockly.inject = function(container, opt_options) {
...
@@ -64,12 +64,16 @@ Blockly.inject = function(container, opt_options) {
*/
*/
Blockly
.
parseToolboxTree_
=
function
(
tree
)
{
Blockly
.
parseToolboxTree_
=
function
(
tree
)
{
if
(
tree
)
{
if
(
tree
)
{
if
(
typeof
tree
!=
'
string
'
&&
typeof
XSLTProcessor
==
'
undefined
'
)
{
if
(
typeof
tree
!=
'
string
'
)
{
// In this case the tree will not have been properly built by the
if
(
typeof
XSLTProcessor
==
'
undefined
'
&&
tree
.
outerHTML
)
{
// browser. The HTML will be contained in the element, but it will
// In this case the tree will not have been properly built by the
// not have the proper DOM structure since the browser doesn't support
// browser. The HTML will be contained in the element, but it will
// XSLTProcessor (XML -> HTML). This is the case in IE 9+.
// not have the proper DOM structure since the browser doesn't support
tree
=
tree
.
outerHTML
;
// XSLTProcessor (XML -> HTML). This is the case in IE 9+.
tree
=
tree
.
outerHTML
;
}
else
if
(
!
(
tree
instanceof
Element
))
{
tree
=
null
;
}
}
}
if
(
typeof
tree
==
'
string
'
)
{
if
(
typeof
tree
==
'
string
'
)
{
tree
=
Blockly
.
Xml
.
textToDom
(
tree
);
tree
=
Blockly
.
Xml
.
textToDom
(
tree
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment