mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
📝 Update API documentation to ES6 [ci skip]
This commit is contained in:
@@ -8,7 +8,7 @@ This module does not include a web interface so you need to open
|
||||
result.
|
||||
|
||||
```javascript
|
||||
const contentTracing = require('electron').contentTracing;
|
||||
const { contentTracing } = require('electron');
|
||||
|
||||
const options = {
|
||||
categoryFilter: '*',
|
||||
@@ -18,8 +18,8 @@ const options = {
|
||||
contentTracing.startRecording(options, function() {
|
||||
console.log('Tracing started');
|
||||
|
||||
setTimeout(function() {
|
||||
contentTracing.stopRecording('', function(path) {
|
||||
setTimeout(() => {
|
||||
contentTracing.stopRecording('', (path) => {
|
||||
console.log('Tracing data recorded to ' + path);
|
||||
});
|
||||
}, 5000);
|
||||
|
||||
Reference in New Issue
Block a user