خرید بک لینک

Vote count: 0

Is it guaranteed that this code

function runEmbeddedJSInPageEnvironment(code) {
  var e = document.createElement('script');
  e.type = 'text/javascript';
  e.appendChild(document.createTextNode(code));
  (document.head || document.documentElement).appendChild(e);
  e.parentNode.removeChild(e);
}

runEmbeddedJSInPageEnvironment("$('#someform').off('submit');");

will wait for the code passed to the runEmbeddedJSInPageEnvironment to finish first, and only then remove it from the page by calling removeChild function?

Or can it be removed before this code finished to execute?

asked 50 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 11 فروردين 1395 ساعت: 18:20

صفحه بندی