Skip to content

Build Iframe. Ignore X-Frame-Options, Content-Security-Policy, X-Content-Type-Options, X-Xss-Protection etc.

Notifications You must be signed in to change notification settings

nodeteamdev/openiframe

Repository files navigation

Build <iframe> and ignore X-Frame-Options, Content-Security-Policy, X-Content-Type-Options, X-Xss-Protection etc. Normally such headers prevent embedding a web page in an <iframe>

openiframe.es6.js

Install

 <script src="https://cdn.jsdelivr.net/gh/ChechaValerii/openiframe/openiframe.es6.js"></script>

OpenIframe(options)

Creates an instance of OpenIframe.

Parameters
Name Type Description
options Object  
options.container DOM string - css selector or DOM element  
options.width Number - iframe width  
options.height Number - iframe height  
options.append Boolean - append iframe to container, prepend by default  
options.src String - iframe src  
Examples
new OpenIframe({
   container: '#header',
   height: 600,
   width: 800
   src: 'https://example.com',
   append: true
});
Returns
  • iframe Element

Releases

No releases published

Packages

No packages published