I would like to know which callback to use when the iframe has completed loading.
const iFrame = window.parent.document.getElementById('ReviewGeologueFrame');
iFrame.src = `/Review/GeologueFrame?id=${str}`;
iFrame.onreadystatechange = function (){
if (iFrame.readyState !== 'loading')
{
console.log('iFrame has completed loading');
}
}
When i tried the above snippet, there is no message in the console; what am doing wrong