How to use the iframe-resizer.iframeResize function in iframe-resizer

To help you get started, we’ve selected a few iframe-resizer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github impress-org / givewp / assets / src / js / plugins / form-template / utils.js View on Github external
export const initializeIframeResize = function( iframe ) {
	return new iframeResize(
		{
			log: false,
			sizeWidth: true,
			checkOrigin: [ window.location.origin ],
			heightCalculationMethod: 'documentElementOffset',
			widthCalculationMethod: 'documentElementOffset',
			onMessage: function( messageData ) {
				let parent = iframe.parentElement;
				if ( iframe.parentElement.classList.contains( 'modal-content' ) ) {
					parent = parent.parentElement.parentElement;
				}

				switch ( messageData.message.action ) {
					case 'giveEmbedFormContentLoaded':

						const timer = setTimeout( function() {

iframe-resizer

This project has now been split into two separate packages. Please use '@iframe-resizer/parent' and '@iframe-resizer/child'. See https://iframe-resizer.com/upgrade for more details.

GPL-3.0
Latest version published 1 month ago

Package Health Score

91 / 100
Full package analysis