Grab JavaScript changes from master branch
This commit is contained in:
parent
62a1e619df
commit
8df04c55da
3 changed files with 19 additions and 14 deletions
|
|
@ -403,15 +403,19 @@ function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile
|
|||
xsltProcessor['importStylesheet'](xsl);
|
||||
var eFragment = xsltProcessor['transformToFragment'](xml, window.document);
|
||||
if (eFragment) {
|
||||
/*
|
||||
* This fails in Microsoft Edge...
|
||||
*
|
||||
var machine = eFragment.getElementById(idElement);
|
||||
if (!machine) {
|
||||
displayError("machine generation failed: " + idElement);
|
||||
}
|
||||
else if (!eMachine.parentNode) {
|
||||
displayError("invalid machine element: " + idElement);
|
||||
} else {
|
||||
} else
|
||||
*/
|
||||
if (eMachine.parentNode) {
|
||||
eMachine.parentNode.replaceChild(eFragment, eMachine);
|
||||
doneMachine();
|
||||
} else {
|
||||
displayError("invalid machine element: " + idElement);
|
||||
}
|
||||
} else {
|
||||
displayError("transformToFragment failed");
|
||||
|
|
|
|||
Loading…
Reference in a new issue