Skip to content

Resize an iframe from another domain in multiple ways

Notifications You must be signed in to change notification settings

aaronpan/iframe-resizer-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iframe-resizer-demo

Resize an iframe from another domain in multiple ways

How to use

Copy the repo into your disk.

$ git clone https://github.com/aaronpan/iframe-resizer-demo.git

Then play with the source files under the repo's demo* directories.

Index

  1. Subdomain iframe resize
  2. Use postMessage
  3. Web proxy for cross-domain iframe resize
  4. Use iframe-resizer library

Demo01: Subdomain iframe resize

a.html in domain sub1.aaron.com.

b.html in domain sub2.aaron.com.

a embed b

This demo only works for subdomain cross-iframe.

Demo02: Use postMessage

a.html in domain domain1.com.

b.html in domain domain2.com.

a embed b

Use HTML5 postMessage.

Support: Internet Explorer 8, Firefox 3, Opera 9, Chrome 3和 Safari 4.

Demo03: Web proxy for cross-domain iframe resize

a.html and c.html in domain domain1.com.

b.html in domain domain2.com.

a embed b b embed c

Demo04: Use iframe-resizer library

a.html in domain domain1.com.

b.html in domain domain2.com.

a embed b

Dependency free, IE8+

Related Projects

License

MIT

About

Resize an iframe from another domain in multiple ways

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages