Skip to content

Instantly share code, notes, and snippets.

@hkraji
Created March 30, 2026 22:06
Show Gist options
  • Select an option

  • Save hkraji/e6ee2f1522f59b6030bee580ce7ede4f to your computer and use it in GitHub Desktop.

Select an option

Save hkraji/e6ee2f1522f59b6030bee580ce7ede4f to your computer and use it in GitHub Desktop.
const iframe = document.getElementById('ticketLayout');
iframe.onload = null; // remove the broken handler
// Override with a delayed version
iframe.onload = function() {
const check = setInterval(() => {
if (typeof iframe.contentWindow.dataBind === 'function') {
clearInterval(check);
iframe_onLoad.call(iframe); // call original handler
}
}, 100);
setTimeout(() => clearInterval(check), 10000);
};
// Reload the iframe to trigger it fresh
iframe.src = iframe.src;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment