if (typeof fn === "function") {
// safe to use the function
}Build a cross-browser extension / notebook
Build a cross-browser extension
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.