Neil Patrick's Mansion

    @r/frames

    0.1.6 • Public • Published

    r/iframes

    A library for interacting with <iframes />.

    Change Log

    v0.0.0

    Initial release

    v0.1.1

    Transform modules to commonjs

    v0.1.5

    Library is no built when installed as a dependency. This removes the dependency on Babel packages.

    v0.1.6

    Fixes a polyfill issue for server environments introduced in v0.1.4.

    Installation

    yarn add @r/frames -s

    Usage example

    import * as frames from '@r/frames';
    
    // parent window
    frames.listen('dfp');
    frames.receiveMessageOnce('init.dfp', () => {
      // do stuff.
    });
    
    // iframe
    frames.postMessage(window.parent, 'init.dfp', data);

    TODO

    1. Add tests
    2. Convert to typescript

    Keywords

    none

    Install

    npm i @r/frames

    DownloadsWeekly Downloads

    4

    Version

    0.1.6

    License

    UNLICENSED

    Unpacked Size

    18.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • redditnpm2
    • schwers
    • madlee
    • wick