iframe

Youtube iframe api allow=“autoplay” Chrome 65

拟墨画扇 提交于 2019-12-23 07:46:10
问题 Chrome 65, the current canary version, is blocking iframed youtube videos from auto playing with sound. The latest changes to Chrome require the iframe to have allow="autoplay" How do I go about adding allow="autoplay" to the youtube iframe api? I can't find it in any of the documentation. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe A feature policy allows developers to selectively enable and disable use of various browser features and APIs. Once an origin

Set IFrame allowfullscreen with javascript

人走茶凉 提交于 2019-12-23 07:35:28
问题 I tried to set allowfullscreen attribute to the iframe, but it doesn't work: iframe.allowFullScreen = true I checked it with chrome -> inspect element, but the iframe has no allowfullscreen attribute, after this code. Thanks in advance, 回答1: iframe.setAttribute('allowFullScreen', '') 来源: https://stackoverflow.com/questions/11034473/set-iframe-allowfullscreen-with-javascript

Open.window in iframe

删除回忆录丶 提交于 2019-12-23 07:30:47
问题 I am making a simple webpage for fun and I am a noob at JavaScript and I want to make windows open up when clicked and I want to open them up inside an iframe and I want to give it all the functionality of a normal window.open and I also want it to maximize the windows but inside the iframe and not outside. I know About the window.open and go it to work I just want to make the windows work inside an iframe and not outside. I am using Notepad for as my editor. This is my first question so

Can't load URL into iframe with angularJS

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 07:06:17
问题 Using AngularJS, Im trying to load the "myLink" URL address to iframe in another html. data.No is the id that i pull from another place and works fine (get the Id that i need for the url) in the controller - "TransactionsCtrl": $scope.myLink = "http://"the real url"+ data.No +"&file="+ data.No +"&contract_id="+ data.No; console.log($scope.myLink); in the HTML : <div ng-controller= "TransactionsCtrl"> <iframe ng-src="{{myLink}}"></iframe> </div> and all i get is this : Error: [$interpolate

Determine the mouse position inside an iframe, but inclusive of the parent

别等时光非礼了梦想. 提交于 2019-12-23 06:58:16
问题 I have an iframe inside which i detect a right click and pass the mouse event to a function in the parent. Here, (inside the parent function), i have the logic to display a custom context menu and the context menu html markup is inserted into the parent DOM. Thus is need the mouse position according to the viewport (or the parent DOM), but what i received is relative to the iframe. I tried using offsetTop and offsetParent, but this iterated only till the body tag of the innerpage. 回答1: This

Javascript: get iframe id within loaded page

元气小坏坏 提交于 2019-12-23 06:48:06
问题 I've got a page that has an iframe. Every time the page loads, iframe gets unique id and name assigned to it. I can get the iframe name within loaded iframe like so: alert(parent.window.frames[window.name].name); But when i try to get the id value: alert(parent.window.frames[window.name].id); I get undefined ? Is it possible to get the id attribute of the iframe within loaded page? http://jsfiddle.net/cqFtB/ <iframe id="lyygi8stwZSANUEh" src="http://example.com" name="zma82vRVe18xbAqW" title=

Print the map by parent page with routes and paths which is inside the iframe

醉酒当歌 提交于 2019-12-23 05:42:11
问题 In my project the google map has routes and paths. I need to print the map with them. This page is called as a iframe by it's parent page. I have to call print method within parent page. Note: There are more content other than the map in this iframe. This is the method I tried so far to print the map <script type="text/javascript"> function printWin(){ var iframe=document.getElementById('iframe'); var innerdoc=iframe.contentDocument || iframe.contentWindow.document; var mapdiv=innerdoc

Making AJAX calls from inside of an iframe with different domain

天涯浪子 提交于 2019-12-23 05:31:19
问题 Is it possible to do AJAX calls from inside an iframe that has a different domain source? I've tried script injection but it doesn't work because the iframe's source is secure. I made a simple fiddle with California DMV website here. I'm getting DOM exception 8 error. Is it a security issue? 回答1: It is not possible to modify or make JS calls in an iframe with a different domain source. This is restricted in all browsers for security reasons. See the "Same Origin Policy" for a description of

Reading document.links from an IFrame

为君一笑 提交于 2019-12-23 05:26:32
问题 EDIT: Just a quick mention as to the nature of this program. The purpose of this program is for web inventory. Drawing different links and other content into a type of hierarchy. What I'm having trouble with is pulling a list of links from a webpage within an IFrame. I get the feeling this one is gonna bite me hard. (other posts indicate relevance to xss and domain controls) I'm just trying something with javascript and Iframes. Basically I have a panel with an IFrame inside that goes to

Rails 3 DRY Conditional Layout for iframes

自古美人都是妖i 提交于 2019-12-23 05:20:57
问题 I was recently tasked with loading a portion of my Rails application within an iframe on another website. The relevant pages should be using a different layout file, but only if they're being rendered inside of the iframe. There was a solution proposed here Detect iframe request in a rails app that involved passing a query string parameter. For example the requesting website could call my application through an iframe with the src of http://foo.com/bar?iframe=true . Then in our controller we