Editor slowing down on big project
Yes . You could add a custom formula that detects whether you `re running the app in an iframe . You 'll find examples of how to achieve that here https://stackoverflow.com/questions/326069/how-to-identify-if-a-webpage-is-being-loaded-inside-an-iframe-or-directly-into-t Hey @ , hope this can also help ; To identify whether a webpage is being loaded inside an iframe or directly into the browser window , you can use JavaScript to compare the window and window.top objects . Here 's how it works : 1 . When a page is loaded in an iframe : The window object refers to the current iframe 's window . The window.top object refers to the topmost window , i .e . , the main page that contains the iframe . 2 . When a page is loaded directly into the browser window : The window and window.top objects will be the same . function is_in_iframe (args, ctx) {
if (window.self !== window.top) {
// The page is loaded inside an iframe
console.log("This page is being loaded inside an iframe.");
return true;
} else {
// The page is loaded directly in the browser window
console.log("This page is loaded directly into the browser window.");
}
return false
}- window.self : Refers to the current window (or iframe ) context . - window.top : Refers to the topmost window in the hierarchy . By comparing window.self and window.top , you can determine if the webpage is being loaded in an iframe or directly in the browser . - Preventing iframe embedding : Some websites use this check to block their content from being embedded in iframes (e .g . , to prevent clickjacking ) . - Iframe -specific functionality : You can use this check to apply different behaviors or styling if your content is displayed within an iframe . Sample page in Toddle : https://running_in_iframe.toddle.site/ And running in an iframe : https://patrick.link/now-in-iframe