@newrelic/rrweb-record
v1.1.1
Published
This package contains all the record related code in rrweb.
Readme
@rrweb/record
This package contains all the record related code in rrweb.
Installation
1) Bundler / npm (Recommended)
npm install @rrweb/recordimport { record } from '@rrweb/record';2) Browser Without Bundler (ESM + import maps)
<script type="importmap">
{
"imports": {
"@rrweb/record": "https://cdn.jsdelivr.net/npm/@rrweb/record@latest/+esm"
}
}
</script>
<script type="module">
import { record } from '@rrweb/record';
</script>3) Legacy Direct <script> Include (UMD fallback)
Use this only for compatibility with non-module environments.
<script src="https://cdn.jsdelivr.net/npm/@rrweb/record@latest/umd/record.min.js"></script>The legacy UMD global is rrwebRecord.
Usage
import { record } from '@rrweb/record';
record({
emit(event) {
// send event to server
},
});Notes
Currently this package is really just a wrapper around the record function in the main rrweb package.
All record related code will get moved here in the future.
