Changes between Version 21 and Version 22 of WebInspectorCodingStyleGuide
- Timestamp:
- Dec 12, 2016 11:02:01 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebInspectorCodingStyleGuide
v21 v22 17 17 * Use arrow functions when possible, unless it makes code less readable. See below for examples. 18 18 * For default parameters, add a space around the default assignment: `function foo(isGood = false)` 19 * Trivial public getters can be made a single line and moved to the top of the list of getters in a class. 19 20 20 21 == Naming things … … 163 164 WebInspector.NewObjectType = class NewObjectType extends WebInspector.Object 164 165 { 165 constructor( param)166 constructor(type, param) 166 167 { 167 168 super(); 168 169 console.assert(param instanceof WebInspector.ExpectedType); 170 this._type = type; 169 171 this._propertyName = param; 170 172 } … … 179 181 180 182 // Public 183 184 get type() { return this._type; } 181 185 182 186 get propertyName()