From bb4553baf11945e5f42264297abccb0026325645 Mon Sep 17 00:00:00 2001 From: niftylettuce Date: Tue, 21 Jan 2020 18:12:48 -0600 Subject: [PATCH] docs: fixed README usage --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 799ed9e..b67acbf 100644 --- a/README.md +++ b/README.md @@ -808,12 +808,17 @@ If you're curious why it won't work in IE11, please see this [great documentatio // // var cabin = new Cabin({ key: 'YOUR-CABIN-API-KEY' }); + + // Use cabin globally in your app (instead of `console`) + window.cabin = cabin; + + // Bind event listeners uncaught.start(); uncaught.addListener(function(err, event) { if (!err) { if (typeof ErrorEvent === 'function' && event instanceof ErrorEvent) - return logger.error(event.message, { event: event }); - logger.error({ event: event }); + return cabin.error(event.message, { event: event }); + cabin.error({ event: event }); return; } // this will transform the error's `stack` property