New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kofile/react-child-window

Package Overview
Dependencies
Maintainers
34
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kofile/react-child-window

A React component for opening and managing child browser windows

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
34
Created
Source

React Child Window

Build Status Coverage Status

Ma Child

Usage

import { ChildWindow } from '@kofile/react-child-window'

const App = () => (
  <div>
    <Content>
    <ChildWindow
      onLoad={(childComp, childWindow) => { /* ... */ }}
      onUnload={(childComp, childWindow) => { /* ... */ }}
      options={[
        'url',
        'title',
        ...attributes
      ]}
      mountId='childCSSID'
      open={true}
      setRef={el => { /* ... */ }}
    >
      <User name='default' age='props' />
    </ChildWindow>
  </div>
)

Props

  • onLoad:

    • Function
    • (childComp, childWindow) => void
    • What to do when the child window loads
    • Similar to onComponentDidMount
  • onUnload:

    • Function
    • (childComp, childWindow) => void
    • What to do right before the child window unmounts/closes
    • Similar to componentWillUnmount
  • options:

    • Array<String>
    • [url, title, 'toolbar=false', 'menu=false']
    • url and title are normal strings with the rest of the array are window features
  • mountId:

    • String
    • 'mount'
    • The #id of the element to treat as the domEl inside of ReactDOM.render(ReactEl, domEl)
  • open:

    • Boolean
    • false
    • If this child window is open or not

Keywords

FAQs

Package last updated on 03 Oct 2017

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