Reputation: 1395
I use iframe-resizer to insert content(jsf-pages) in iframe. So, how to detect that server responsed with 404 not found?
Is there some callback or other way to detect this?
Upvotes: 0
Views: 228
Reputation: 1395
const iframeResizerOptions = {
log: true,
checkOrigin: true,
initCallback: (iframe) => {
if (iframe.contentDocument.getElementsByClassName("error-title").length > 0) {
onError();
} else {
onLoad();
}
},
};
You may use initCallback and get iframe from input parameter.
Upvotes: 0