Background: jQuery version 2.1.3 (https://code.jquery.com/jquery-2.1.3.js) has following snippet:
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
Can I replace it with following code (from your example)
if ( !iframe ) {
iframe = document.createElement( "iframe" );
iframe.frameBorder = iframe.width = iframe.height = 0;
}
doc.documentElement.appendChild( iframe );
The purpose is very strange, in short, web firewall’s stupid rule is preventing jQuery code to be executed saying that this is an iframe injection.
Will the snippet serve the original purpose?
Please let me know.
Thank you.
I tried upgrading jQuery but it’s breaking other dependencies.