MCPcopy Index your code
hub / github.com/mailru/FileAPI / displayAltContent

Function displayAltContent

flash/image/html-template/swfobject.js:361–381  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

359 /* Functions to abstract and display alternative content
360 */
361 function displayAltContent(obj) {
362 if (ua.ie && ua.win && obj.readyState != 4) {
363 // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
364 // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
365 var el = createElement("div");
366 obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
367 el.parentNode.replaceChild(abstractAltContent(obj), el);
368 obj.style.display = "none";
369 (function(){
370 if (obj.readyState == 4) {
371 obj.parentNode.removeChild(obj);
372 }
373 else {
374 setTimeout(arguments.callee, 10);
375 }
376 })();
377 }
378 else {
379 obj.parentNode.replaceChild(abstractAltContent(obj), obj);
380 }
381 }
382
383 function abstractAltContent(obj) {
384 var ac = createElement("div");

Callers 1

matchVersionsFunction · 0.70

Calls 2

createElementFunction · 0.70
abstractAltContentFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…