Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js test if i am in iframe

function inIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
        return true;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #test #iframe
ADD COMMENT
Topic
Name
7+6 =