From dd4e43eb02accd25cca34e25a30c21e71a16a9ae Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 14 Nov 2013 13:39:44 +0800 Subject: [PATCH] doc: Update new crash-reporter API. --- docs/api/common/crash-reporter.md | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/docs/api/common/crash-reporter.md b/docs/api/common/crash-reporter.md index 17493dd9538d..b966dd4b2a43 100644 --- a/docs/api/common/crash-reporter.md +++ b/docs/api/common/crash-reporter.md @@ -4,24 +4,19 @@ An example of automatically submitting crash reporters to remote server: ```javascript crashReporter = require('crash-reporter'); -crashReporter.setProductName('YourName'); -crashReporter.setCompanyName('YourCompany'); -crashReporter.setSubmissionUrl('https://your-domain.com/url-to-submit'); -crashReporter.setAutoSubmit(true); +crashReporter.start({ + productName: 'YourName', + companyName: 'YourCompany', + submitUrl: 'https://your-domain.com/url-to-submit', + autoSubmit: true +}); ``` -## crashReporter.setProductName(product) +## crashReporter.start(options) -* `product` String - -## crashReporter.setCompanyName(company) - -* `company` String - -## crashReporter.setSubmissionUrl(url) - -* `url` String - -## crashReporter.setAutoSubmit(is) - -* `is` Boolean +* `options` Object + * `productName` String + * `companyName` String + * `submitUrl` String - URL that crash reports would be sent to + * `autoSubmit` Boolean - Send the crash report without user interaction + * `ignoreSystemCrashHandler` Boolean