AngularJS ng-src inside of iframe

You can use a filter instead: HTML: <iframe src=”https://stackoverflow.com/questions/24163152/{{yourURL” trustAsResourceUrl}}”></iframe> where ‘yourURL’ is the URL of the iframe and ‘trustAsResourceUrl’ is the filter and is defined as in some module(like eg. filters-module) as: JS: angular.module(‘filters-module’, []) .filter(‘trustAsResourceUrl’, [‘$sce’, function($sce) { return function(val) { return $sce.trustAsResourceUrl(val); }; }]) And you can use this filter in all … Read more

Nested iframes, AKA Iframe Inception

Thing is, the code you provided won’t work because the <iframe> element has to have a “src” property, like: <iframe id=”uploads” src=”http://domain/page.html”></iframe> It’s ok to use .contents() to get the content: $(‘#uploads).contents() will give you access to the second iframe, but if that iframe is “INSIDE” the http://domain/page.html document the #uploads iframe loaded. To test … Read more

How to display an IFRAME inside a jQuery UI dialog

The problems were: iframe content comes from another domain iframe dimensions need to be adjusted for each video The solution based on omerkirk’s answer involves: Creating an iframe element Creating a dialog with autoOpen: false, width: “auto”, height: “auto” Specifying iframe source, width and height before opening the dialog Here is a rough outline of … Read more

HTML5 iFrame Seamless Attribute

Updated: October 2016 The seamless attribute no longer exists. It was originally pitched to be included in the first HTML5 spec, but subsequently dropped. An unrelated attribute of the same name made a brief cameo in the HTML5.1 draft, but that too was ditched mid-2016: So I think the gist of it all both from … Read more

Is it possible to add Request Headers to an iframe src request?

You can make the request in javascript, setting any headers you’d like. Then you can URL.createObjectURL(), to get something suitable for the src of the iframe. var xhr = new XMLHttpRequest(); xhr.open(‘GET’, ‘page.html’); xhr.onreadystatechange = handler; xhr.responseType=”blob”; xhr.setRequestHeader(‘Authorization’, ‘Bearer ‘ + token); xhr.send(); function handler() { if (this.readyState === this.DONE) { if (this.status === 200) … Read more