Skip to content

Instantly share code, notes, and snippets.

@davecra
Last active May 29, 2020 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davecra/0521c06f2d855e273c63603091187193 to your computer and use it in GitHub Desktop.
Save davecra/0521c06f2d855e273c63603091187193 to your computer and use it in GitHub Desktop.
Required code for web pack to work in a project
/*************************************************/
/* REQUIRED BY WEB PACK - DO NOT DELETE */
/*************************************************/
function getGlobal() {
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: undefined;
}
const g = getGlobal();
g.onSendEvent = onSendEvent;
g.onRibbonButtonClick = onRibbonButtonClick
/*************************************************/
/* REQUIRED BY WEB PACK - DO NOT DELETE */
/*************************************************/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment