Iframe load event fires twice

The function bound to (@load=”myFunction”) fires once when the iframe is created and once when it’s actually loaded. Why does it fire when the iframe is created, and how to avoid it? <…

React Native change the zoom of iframe using WebView

Hello, It is frst time I am using React Native you could say and trying to use the WebView from the react-native-webview library. Inside the WebView I have a iframe tag that I want it to strect out …

Succeeded in fetching data, but it gives TypeError: Cannot read property ‘0’ of null

I have another problem today. ComponentDidMount seems to work fine(it brings data from the server), but when I try to use the data I received, it’d throw TypeError: Cannot read property ‘0’ of null. …

Why is my iframe causing the rest of the page to go blank?

I’m trying to make an iframe that embeds on any web page where it only shows up as a button on the bottom right of a webpage and when clicked open an about 100px by 100px box that is also embeded on …

Can’t update iframe’s src in the viewer in ASP.NET

In shared folder of ASP.NET C#, I create a .cshtml which defines a button that can GET data from an API. I would like to generate an url and use it to update an iframe of a viewer. function …

Hide Twitch iFrame If Channel Not Live

We have a site embedding Twitch streams. They have events for a channel going offline. So when a stream is live, then it goes offline, I can essentially then hide the iframe. However, I’m wanting to …

How to automatically add a sandbox attribute to iframe using JS

I have multiple video players on my site, but they open popup ads, so to block them I use the sandbox attribute, but not all of the players have the sandbox attribute. So I need javascript to automatically add the sandbox=”allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-scripts allow-top-navigation allow-forms attribute to all iframes on the page. How can I do this? Help would be highly appreciated! Thanks! Answer You can select all the frames in a page by using getElementsByTagName, loop over them, and set the attribute of a DOM element by using Element.setAttribute: jsfiddle example here

Hide custom cursor when mouseover on iframe

I am struggling trying to find out how to hide my custom cursor when it’s over an iframe. I designed a custom cursor but it works fine in all the web sections. However, when it goes over he Vimeo iframe, the mouse stay at the edge of the iframe and shows the default web browser cursor. I think the easiest way, would be hide the custom cursor whenever I make mouseover on the iframe. Trying to figure out by using CSS (applying display:none when is the custom cursor is over the iframe) and js but none worked out. Here the

Flask application redirects to empty “about:srcdoc” page when index (root path) is requested

I am working on a Flask web application. It has two iframes side-by-side and accesses a csv file. The file contains urls that, by using selenium .page_source(), will be loaded into the iframes using srcdoc. The page source is edited using beautiful soup 4 before being turned into a string and being sent to the frontend. The issue I am facing right now is that, when I open the app (either locally or the version hosted on a virtual machine) SOMETIMES I am redirected to an empty page with “about:srcdoc” in the url bar. While it doesnt happen 100%, it

Microsoft Edge not displaying

I have a button that creates a new tab and loads some simple HTML and an iframe with a data URI passed into it. The new tab opens and I can see that this is all displayed in the DOM using the …