How to use the iframe-resizer.iframeResizerContentWindow 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 patternplate / patternplate / packages / probe-client / index.js View on Github external
function main() {
  const query = querystring.parse(global.location.search.slice(1));

  if (query.resize === "true") {
    require("iframe-resizer").iframeResizerContentWindow;
  }

  if (query.reload === "true") {
    const ws = new WebSocketClient({
      src: `ws://${global.location.host}/api/`,
      reconnect: true,
      interval: 1000
    });

    ws.open();

    ws.onMessage(envelope => {
      const message = ARSON.parse(envelope.data);
      if (message.type === "start") {
        window.location.reload();
      }

iframe-resizer

Keep same and cross domain iFrames sized to their content with support for window/content resizing, and multiple iFrames.

MIT
Latest version published 16 days ago

Package Health Score

84 / 100
Full package analysis