Gathering detailed insights and metrics for react-window-opener
Gathering detailed insights and metrics for react-window-opener
Gathering detailed insights and metrics for react-window-opener
Gathering detailed insights and metrics for react-window-opener
npm install react-window-opener
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (68.6%)
HTML (25.46%)
CSS (5.93%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
15 Stars
22 Commits
2 Forks
1 Watchers
20 Branches
1 Contributors
Updated on Jul 25, 2024
Latest Version
0.0.7
Package Id
react-window-opener@0.0.7
Unpacked Size
19.67 kB
Size
4.49 kB
File Count
6
NPM Version
6.14.4
Node Version
12.16.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
19
A small reactjs utility to make sure that window.open actually opens popup and cominecate with the parent window.opener
If you are using React and opening a window popup for any reason like Google authentication, for example, you will need to pass the data back to the parent page. but as you are using react you can't access the function in your page components via 'window.opener'،
https://ahakem.github.io/react-window.opener/#/
1npm install react-window-opener
or
1yarn add react-window-opener
1 2import WindowOpener from 'react-window-opener' 3 4export default function Example { 5 const childResponse = (err, res) => { 6 if (err) { 7 console.log(res, 'err') 8 } 9 console.log(res, 'res') 10 } 11 return ( 12 <WindowOpener url='/popUp-URL' bridge={childResponse}> 13 ) 14}
just pass the needed data using
window.opener.onSuccess(state)
1export default function SmallWindow() { 2 const [state, setstate] = useState('') 3 const update = (evt) => { 4 setstate(evt.target.value) 5 window.opener.onSuccess(state) 6 } 7 return ( 8 <> 9 <input value={state} onChange={update} /> 10 <button 11 onClick={() => { 12 window.close() 13 }} 14 > 15 Close Me 16 </button> 17 </> 18 ) 19}
All you need to import it like that more info here
1import dynamic from 'next/dynamic' 2const WindowOpener = dynamic(() => import('react-window-opener'), { ssr: false }) 3
Params | Value | Default Value | Description |
---|---|---|---|
url | string | REQUIRED | the url for the page which will open in the popup |
bridge | function | REQUIRED | Function to handel the result that you will pass from the child popup |
width | number | 300 | PopUp Width |
height | number | 400 | PopUp Height |
className | Empty |
MIT © ahakem
The idea came from this repo with some enhancment EnetoJara/window-opener
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
103 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More