BruceGitHub / react-headinjectscript

a component react that inject script tag on head tag

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HeadInjectScript

a component react that inject script tag on head tag

Build Status

Usage

npm install react-headinjectscript

<HeadInjectScript 
    injectBeforeEvent={callback_before_event} //first event with no parameter
    injectsource={callback_get_string_src} // when retrieve source script whith no parameter
    injectDoneEvent={callback_done_event}  // when append to head tag no parameter
    injectOnLoadScriptEvent={callback_load_event} // when load after injectDoneEvent whith url parameter
 />

Test

npm test

Run Demo

cd demo

npm install

Run demo

npm start

Alt Text

About

a component react that inject script tag on head tag

License:MIT License


Languages

Language:JavaScript 100.0%