PhantomJS has a partial ECMAScript 5 implementation but it does
not include Function.prototype.bind. Detect that and error gracefully
instead of erroring out in the middle of a phantomjs qunit run.
Change-Id: Ic06e08490e8f297fda479c4adaf9b2d8735f63ad
* @param string tag to create
* @return DOMElement
*/
- createSvgElement: document.createElementNS
+ createSvgElement: ( document.createElementNS && Function.prototype.bind )
? document.createElementNS.bind( document, 'http://www.w3.org/2000/svg' )
// throw a error for browsers which does not support document.createElementNS (IE<8)
- : function () { throw new Error( 'document.createElementNS not supported' ); },
+ : function () { throw new Error( 'An ES5 compatible javascript engine is required for the profile visualization.' ); },
/**
* @param DOMElement|undefined