commit
e8517338a9
11 changed files with 11 additions and 11 deletions
|
@ -96,7 +96,7 @@ The full HTML page with these frameworks and `pow` spec:
|
|||
```html src="index.html"
|
||||
```
|
||||
|
||||
The page can be divided into four parts:
|
||||
The page can be divided into five parts:
|
||||
|
||||
1. The `<head>` -- add third-party libraries and styles for tests.
|
||||
2. The `<script>` with the function to test, in our case -- with the code for `pow`.
|
||||
|
|
|
@ -9,7 +9,7 @@ Clock.prototype._render = function() {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -9,7 +9,7 @@ function Clock({ template }) {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -10,7 +10,7 @@ class Clock {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -11,7 +11,7 @@ Clock.prototype._render = function() {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -10,7 +10,7 @@ class Clock {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -10,7 +10,7 @@ class Clock {
|
|||
if (hours < 10) hours = '0' + hours;
|
||||
|
||||
let mins = date.getMinutes();
|
||||
if (mins < 10) min = '0' + mins;
|
||||
if (mins < 10) mins = '0' + mins;
|
||||
|
||||
let secs = date.getSeconds();
|
||||
if (secs < 10) secs = '0' + secs;
|
||||
|
|
|
@ -255,7 +255,7 @@ The syntax is:
|
|||
throw <error object>
|
||||
```
|
||||
|
||||
Technically, we can use anything as an error object. That may be even a primitive, like a number or a string, but it's better to use objects, preferrably with `name` and `message` properties (to stay somewhat compatible with built-in errors).
|
||||
Technically, we can use anything as an error object. That may be even a primitive, like a number or a string, but it's better to use objects, preferably with `name` and `message` properties (to stay somewhat compatible with built-in errors).
|
||||
|
||||
JavaScript has many built-in constructors for standard errors: `Error`, `SyntaxError`, `ReferenceError`, `TypeError` and others. We can use them to create error objects as well.
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ These properties are rarely needed, but still they are the "most outer" geometry
|
|||
|
||||
The `offsetParent` is the nearest ancestor that is:
|
||||
|
||||
1. CSS-positioned (`position` is `absolute`, `relative` or `fixed`),
|
||||
1. CSS-positioned (`position` is `absolute`, `relative`, `fixed` or `sticky`),
|
||||
2. or `<td>`, `<th>`, `<table>`,
|
||||
2. or `<body>`.
|
||||
|
||||
|
|
|
@ -101,6 +101,6 @@ class HoverIntent {
|
|||
elem.removeEventListener('mousemove', this.onMouseMove);
|
||||
elem.removeEventListener('mouseover', this.onMouseOver);
|
||||
elem.removeEventListener('mouseout', this.onMouseOut);
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,6 +45,6 @@ class HoverIntent {
|
|||
|
||||
destroy() {
|
||||
/* your code to "disable" the functionality, remove all handlers */
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue