Answers for "js test if i am in iframe"

1

js test if i am in iframe

function inIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
        return true;
    }
}
Posted by: Guest on March-02-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language