Skip to content

Module: Create Invisible Iframe

Haoxi Tan edited this page Jan 9, 2020 · 2 revisions

Summary

  • Objective: Create an invisible iframe on the page

  • Authors: passbe

  • Browsers: All

  • Parameters:

    • URL: the URL to load in the invisible iframe.
  • Code

Internal Working

        createInvisibleIframe: function() {
                var iframe = this.createElement('iframe', {
                                width: '1px',
                                height: '1px',
                                style: 'visibility:hidden;'
                        });

                document.body.appendChild(iframe);

                return iframe;
        },

Feedback

Clone this wiki locally