Skip to content

Commit

Permalink
Add test for #164
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasmullie committed Mar 16, 2017
1 parent 04fe99d commit 19886d4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/js/JSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,27 @@ function otherFuncName() {
'!1!==!0',
);

// https://github.com/matthiasmullie/minify/issues/164
$tests[] = array(
'Calendar.createElement = function(type, parent) {
var el = null;
if (document.createElementNS) {
// use the XHTML namespace; IE won\'t normally get here unless
// _they_ "fix" the DOM2 implementation.
el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
} else {
el = document.createElement(type);
}
if (typeof parent != "undefined") {
parent.appendChild(el);
}
return el;
};',
'Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type)}else{el=document.createElement(type)}
if(typeof parent!="undefined"){parent.appendChild(el)}
return el}',
);

// known minified files to help doublecheck changes in places not yet
// anticipated in these tests
$files = glob(__DIR__.'/sample/minified/*.js');
Expand Down

0 comments on commit 19886d4

Please sign in to comment.