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

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