Changes between Version 12 and Version 13 of WebInspectorCodingStyleGuide
- Timestamp:
- Aug 11, 2014, 5:15:09 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebInspectorCodingStyleGuide
v12 v13 62 62 * A `.catch()` block is considered resolved if it does not re-throw an `Error` instance. Re-throw if you want to log an error message and allow other parts of a chain (i.e, an API client) to handle an error condition. 63 63 * Don't directly pass a promise's `resolve` function to `Object.addEventListener`, as it will leak the promise if the event never fires. Instead, use a single-fire `WebInspector.EventListener` object defined outside of the promise chain and connect it inside a `.then()` body. Inside the `.catch` block, disconnect the `EventListener` if necessary. 64 * For APIs that return promises, document what the fulfilled value will be, if any. Example: `createSession() // --> (sessionId)` 64 65 65 66 == New class skeleton