mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Dev: Update util
This commit is contained in:
@@ -1640,7 +1640,7 @@ Inject script tag into page with given src value.
|
||||
|cb |function|Onload callback|
|
||||
|
||||
```javascript
|
||||
loadJs('main.js', function ()
|
||||
loadJs('main.js', function (isLoaded)
|
||||
{
|
||||
// Do something...
|
||||
});
|
||||
@@ -1904,6 +1904,25 @@ var start = perfNow();
|
||||
console.log(perfNow() - start);
|
||||
```
|
||||
|
||||
## prefix
|
||||
|
||||
Add vendor prefixes to a CSS attribute.
|
||||
|
||||
|Name |Type |Desc |
|
||||
|------|------|----------------------|
|
||||
|name |string|Property name |
|
||||
|return|string|Prefixed property name|
|
||||
|
||||
### dash
|
||||
|
||||
Create a dasherize version.
|
||||
|
||||
```javascript
|
||||
prefix('text-emphasis'); // -> 'WebkitTextEmphasis'
|
||||
prefix.dash('text-emphasis'); // -> '-webkit-text-emphasis'
|
||||
prefix('color'); // -> 'color'
|
||||
```
|
||||
|
||||
## pxToNum
|
||||
|
||||
Turn string like '0px' to number.
|
||||
|
||||
Reference in New Issue
Block a user