From 14eb62cd5fc0677f15fd708428d17c0edd079406 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 18 May 2020 17:21:29 +0300 Subject: [PATCH] minor fixes --- 1-js/05-data-types/11-date/6-get-seconds-today/solution.md | 2 ++ 1-js/13-modules/01-modules-intro/article.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/1-js/05-data-types/11-date/6-get-seconds-today/solution.md b/1-js/05-data-types/11-date/6-get-seconds-today/solution.md index a483afe9..8f8e52b6 100644 --- a/1-js/05-data-types/11-date/6-get-seconds-today/solution.md +++ b/1-js/05-data-types/11-date/6-get-seconds-today/solution.md @@ -23,4 +23,6 @@ function getSecondsToday() { let d = new Date(); return d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds(); } + +alert( getSecondsToday() ); ``` diff --git a/1-js/13-modules/01-modules-intro/article.md b/1-js/13-modules/01-modules-intro/article.md index 319794c9..d4ed5024 100644 --- a/1-js/13-modules/01-modules-intro/article.md +++ b/1-js/13-modules/01-modules-intro/article.md @@ -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. +```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 What's different in modules, compared to "regular" scripts?