npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

pioneer.iframe

0.1.0

@samccone

npmHomeRepoSnykSocket
Downloads:7
$ npm install pioneer.iframe
DailyWeeklyMonthlyYearly

Pioneer Iframe

Build Status Gitter chat

Widget.Iframe is a utility class that extends from the base Pioneer Widget Class.

Table of contents

  • Installing
  • Using
  • Api
    • Focus
    • Unfocus

Installing

npm install pioneer.iframe

Using

pioneer --require node_modules/pioneer.iframe/lib
  MyFrame = Widget.Iframe.extend({
    root: "iframe"
  });

  frame = new MyFrame();
  // Changing the context to interact with the contents of the iframe
  frame.focus();
  // Resetting the context to interact with the iframes parent.
  frame.unfocus();

API

Focus

function focus()...

Switches context from the default window to the iframe. All subsequent methods will be performed in the iframe until unfocus() is called. Returns a promise that resolves to the widget instance on which it was called

Unfocus

function unfocus()...

Switches context back to the default window (or the parent of the iframe). Returns a promise that resolves to the widget instance on which it was called