Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gardr-plugin-ext-send-size

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gardr-plugin-ext-send-size

Gardr plugin for sending iframe inner via xde

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source

Gardr Send Size Plugin (Ext)

Gardr plugin for sending size of an iframe content to host at any given time.

Install

npm install gardr-plugin-ext-send-size --save

Bundle

In your ext bundle file:

    var gardrExt = require('gardr-ext');
    var sendSize = require('gardr-plugin-ext-send-size');

    gardrExt.plugin(sendSize);

    module.exports = gardrExt;

Usage

This plugin uses cross-domain-events to communicate between frames with "plugin:send-size" namespace.

To trigger it in host:

var xde = require('cross-domain-events');

xde.on('plugin:send-size', function(response) { // listen for plugin:send-size response
    console.log(response.data.id); // id of an gardr iframe
    console.log(response.data.size); // object containing width and height of iframe contents
});

xde.sendTo(document.querySelector('#banner').contentWindow, 'plugin:send-size'); // send plugin:send-size trigger to iframe inside div#banner

Keywords

FAQs

Package last updated on 12 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc