How to use the iframe-resizer/js/iframeResizer 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 davidjbradshaw / iframe-resizer-react / src / index.jsx View on Github external
useEffect(() => {
    const iframe = iframeRef.current

    iframeResize({ ...rest, onClose }, iframe)

    return () => iframe.iframeResizer && iframe.iframeResizer.removeListeners()
  }, []) // eslint-disable-line react-hooks/exhaustive-deps
github supercomments / supercomments / src / components / FramedTabpanel.js View on Github external
ref={(el) => {
              if (el && !this.iframeResizerInstantiated) {
                iframeResizer({
                  checkOrigin: false,
                  scrolling: true
                }, findDOMNode(el));
                this.iframeResizerInstantiated = true;
              }
            }}
            style={{
github JetBrains / ring-ui / packages / docs / components / index.js View on Github external
componentDidMount() {
    const iFrameSelector = 'iframe[data-resize="enabled"]';
    this.iframesToResize = document.queryAll(iFrameSelector).length;

    this.retriggerHashNavigation();
    iFrameResize({
      resizedCallback: () => {
        this.iframesToResize--;
        this.retriggerHashNavigation();
      }
    }, iFrameSelector);
  }
github K15t / spark / spark-common / src / main / js / src / spark-bootstrap.js View on Github external
var elementIdSparkAppContainer = angularAppName + '-spark-app-container';
        var appContainerAlreadyCreated = AJS.$('#' + elementIdSparkAppContainer).length > 0;

        if (appContainerAlreadyCreated) {
            AJS.$('#' + elementIdSparkAppContainer).remove();
        }

        AJS.$(element).append(sparkTemplates.appBootstrapContaineriFrame({
            id: elementIdSparkAppContainer,
            src: location.protocol + '//' + location.host + fullAppPath,
            createOptions: AJS.$.extend(defaultDialogOptions, createOptions),
            className: css.className
        }));

        iframeResizer([{
            'autoResize': true,
            'heightCalculationMethod': 'max'
        }], AJS.$(element).find('iframe')[0]);
    };
github JetBrains / ring-ui / packages / ring-ui-docs / components / index.js View on Github external
componentDidMount() {
    const iFrameSelector = 'iframe[data-resize="enabled"]';
    this.iframesToResize = document.queryAll(iFrameSelector).length;

    this.retriggerHashNavigation();
    iFrameResize({
      resizedCallback: () => {
        this.iframesToResize--;
        this.retriggerHashNavigation();
      }
    }, iFrameSelector);
  }

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