minor fixes
This commit is contained in:
parent
6c6d5a4478
commit
14eb62cd5f
2 changed files with 6 additions and 0 deletions
|
@ -23,4 +23,6 @@ function getSecondsToday() {
|
||||||
let d = new Date();
|
let d = new Date();
|
||||||
return d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds();
|
return d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alert( getSecondsToday() );
|
||||||
```
|
```
|
||||||
|
|
|
@ -57,6 +57,10 @@ Like this:
|
||||||
|
|
||||||
The browser automatically fetches and evaluates the imported module (and its imports if needed), and then runs the script.
|
The browser automatically fetches and evaluates the imported module (and its imports if needed), and then runs the script.
|
||||||
|
|
||||||
|
```warn header="Modules work only via HTTP, not in local files"
|
||||||
|
If you try to open a web-page locally, via `file://` protocol, you'll find that `import/export` directives don't work. Use a local web-server, such as [static-server](https://www.npmjs.com/package/static-server#getting-started) or VS Code [Live Server Extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) to test them.
|
||||||
|
```
|
||||||
|
|
||||||
## Core module features
|
## Core module features
|
||||||
|
|
||||||
What's different in modules, compared to "regular" scripts?
|
What's different in modules, compared to "regular" scripts?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue