mirror of
https://github.com/liriliri/eruda.git
synced 2026-04-01 10:18:35 +08:00
Use let instead of var
This commit is contained in:
@@ -14,7 +14,7 @@ Initialize eruda.
|
||||
|useShadowDom=true|boolean |Use shadow dom for css encapsulation |
|
||||
|
||||
```javascript
|
||||
var el = document.createElement('div');
|
||||
let el = document.createElement('div');
|
||||
document.body.appendChild(el);
|
||||
|
||||
eruda.init({
|
||||
@@ -60,7 +60,7 @@ eruda.position(); // -> {x: 20, y: 20}
|
||||
Get tool, eg. console, elements panels.
|
||||
|
||||
```javascript
|
||||
var console = eruda.get('console');
|
||||
let console = eruda.get('console');
|
||||
console.log('eruda');
|
||||
```
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ Js文件对于移动端来说略重(gzip后大概100kb)。建议通过url参
|
||||
* tool:指定要初始化哪些面板,默认加载所有。
|
||||
|
||||
```javascript
|
||||
var el = document.createElement('div');
|
||||
let el = document.createElement('div');
|
||||
document.body.appendChild(el);
|
||||
|
||||
eruda.init({
|
||||
|
||||
@@ -22,7 +22,7 @@ Display console logs. Implementation detail follows the [console api spec](https
|
||||
|maxLogNum |string |Max log number |
|
||||
|
||||
```javascript
|
||||
var console = eruda.get('console');
|
||||
let console = eruda.get('console');
|
||||
console.config.set('catchGlobalErr', true);
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ All these methods can be used in the same way as window.console object.
|
||||
Note: When called, a corresponding event is triggered.
|
||||
|
||||
```javascript
|
||||
var console = eruda.get('console');
|
||||
let console = eruda.get('console');
|
||||
console.log('eruda is a console for %s.', 'mobile browsers');
|
||||
console.table([{test: 1}, {test: 2}, {test2: 3}], 'test');
|
||||
console.error(new Error('eruda'));
|
||||
@@ -295,7 +295,7 @@ Add color to select a color.
|
||||
Add a separator.
|
||||
|
||||
```javascript
|
||||
var cfg = eruda.util.createCfg('test');
|
||||
let cfg = eruda.util.createCfg('test');
|
||||
|
||||
cfg.set(eruda.util.defaults(cfg.get(), {
|
||||
testBool: true,
|
||||
|
||||
Reference in New Issue
Block a user