iframe

Is the “iframe sandbox” technique safe?

拜拜、爱过 提交于 2020-01-11 20:58:49
问题 Update: Since this is unanswered, I'm changing the question slightly. Comments on the post on Dean's blog linked below indicate this technique does not work in Safari. My question now is: does the technique described below work* in modern browsers, and in particular can someone confirm whether it works in Safari? Here's a more recent blog post. It says at one point: Sandboxed natives ... are supported in a variety of browsers, including ... Safari 2.0+ ...but later says that the iframe

Is the “iframe sandbox” technique safe?

北战南征 提交于 2020-01-11 20:57:57
问题 Update: Since this is unanswered, I'm changing the question slightly. Comments on the post on Dean's blog linked below indicate this technique does not work in Safari. My question now is: does the technique described below work* in modern browsers, and in particular can someone confirm whether it works in Safari? Here's a more recent blog post. It says at one point: Sandboxed natives ... are supported in a variety of browsers, including ... Safari 2.0+ ...but later says that the iframe

iframe的坑

情到浓时终转凉″ 提交于 2020-01-11 17:42:18
通信例子 parent: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>MathJax v3 with interactive TeX input and HTML output</title> <script src="./js/jquery.min.js"></script> </head> <body> <iframe id="child" src='./child.html' width="800" height="600px" onload="echartIframeOnLoad()"></iframe> <script> function echartIframeOnLoad(e) { document.getElementById('child').contentWindow.postMessage( '我是你爸爸3', '*' ); } $(function () { document.getElementById('child').contentWindow.postMessage( '我是你爸爸1', '*' ); }); setTimeout(() => {

increasing memory usage with jquery

你说的曾经没有我的故事 提交于 2020-01-11 13:14:20
问题 I am developing a site which heavily uses jquery (UI) for providing a good user experience. For some (stupid) reason parts of this site are shown within an iframe and there also is a button for refreshing the iframe to get the latest data from the server. The problem is that each time when refreshing the iframe the memory usage increases leading to serious memory problems after some time (Tested in IE8 & 9). But this occurs only if the jquery library is loaded. This behaviour can be seen best

What's the best way to periodically reload an iframe with React?

早过忘川 提交于 2020-01-11 12:37:13
问题 I'm building a webpage using React which means I can't manipulate the DOM directly. I've tried reloading my iframe by updating the url state but that doesn't seem to reload the page. This is the state code I have tried. componentDidMount: function() { setInterval(function(){ this.setState({currentUrl:currentUrl}); }.bind(this), 1000); }, getInitialState: function() { return {defaultUrl:this.props.graph.url, currentUrl:this.props.graph.url}; }, render() { // render the graph iframe return (

Capture mouse right click event inside a iframe using jquery

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-11 11:18:10
问题 I need to capture right mouse click event inside a iframe in asp.net using any javascript or jquery codes. below is the code i have tried so far. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Detect IFrame Clicks</title> <script type="text/javascript" language="javascript" src="JScript/jquery-1.7.1.js"></script> <script type="text/javascript" language="javascript" src="JScript/jquery.ui.core.js"></script> <script type="text/javascript"

Trick To Get Qt QWebView Bridge Accessible from Webkit IFRAME (Local Pages)

偶尔善良 提交于 2020-01-11 10:43:38
问题 My Qt C++ (Qt 5.5) application uses a QWebView widget. After a lot of confusion and hard work, I have managed to get the QtWebKit Bridge technique to work and now have my Webkit document (local pages, no web server) to be able to call the C++ functions. The resources for you on that are: http://doc.qt.io/qt-5/qtwebkit-bridge.html https://stackoverflow.com/a/4979636/105539 Now, however, I have introduced an IFRAME into the page, and so have a child document. Trouble is, I'm not able to get the

Differences in using <iframe> and <embed> for displaying SVG and scripting

≡放荡痞女 提交于 2020-01-11 08:34:08
问题 I'm trying to create Dynamic SVG graphics, it is my understanding that the only way to create dynamic SVG is to use a scripting language, so I have a few questions, basically I'd like to load or embed the SVG to a HTML web page and control the graphics using Inputs in the web page, rather than hardcoding the ECMAscript in the SVG file. I'm not entirely sure if I should use the embed tag or an iframe for displaying the SVG here are my doubts regarding SVG and scripting: Whats the difference

Google doc viewer doesn't work with Amazon s3 signed urls

不问归期 提交于 2020-01-11 06:36:06
问题 I try to display a .doc file stored on a S3 bucket inside an iframe thanks to google doc viewer api. I already did some research and found this, which i tried to apply here : var encodedUrl = encodeURIComponent("http://myAPI.com/1d293950-67b2-11e7-8530-318c83fb9802/example.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256%26X-Amz-Credential=GNRO0BLDYAJP1FU7ALIS%2F20170717%2Fus-east-1%2Fs3%2Faws4_request%26X-Amz-Date=20170717T145429Z%26X-Amz-Expires=600%26X-Amz-SignedHeaders=host%26X-Amz-Signature

Use the ::before generated content selector on an iframe element

我只是一个虾纸丫 提交于 2020-01-11 05:05:08
问题 <!DOCTYPE html> <html> <head> <style type="text/css"> #test iframe { border: none; background: #333; width: 500px; height: 500px; overflow: hidden; } #test iframe:before { display: block; content: " test"; width: 500px; height: 500px; background: url('overlay.png') no-repeat; position: relative; top: 0px; left: 0px; z-index: 999; } </style> </head> <body> <div id="test"> <p><iframe></iframe></p> </div> </body> </html> I'm trying to place an image over an iframe but for some reason the :