Skip to content

Commit 8c08c87

Browse files
authored
Updated universal browser example readme (#1252)
1 parent 04b4e72 commit 8c08c87

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
- npm install
2-
- npm start
1+
# Universal Browser Example
32

4-
This only uses a server to get around CORS for loading the rollbar library from a local file via the
5-
snippet.
3+
This example demonstrates using Rollbar.js with the async snippet pattern in a browser environment.
4+
5+
## Setup
6+
7+
```bash
8+
npm install
9+
npm start
10+
```
11+
12+
## Usage
13+
14+
Visit http://localhost:3000/test to see the example in action.
15+
16+
## How it works
17+
18+
- Uses the Rollbar snippet to asynchronously load the library
19+
- Includes a test server to avoid CORS issues when loading local files
20+
- Demonstrates error capture when clicking buttons that call undefined functions

0 commit comments

Comments
 (0)