haori 0.62.3 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js は、HTML 属性を中心にして動的な UI を実現する軽量なライブラリです。JavaScript をほとんど書かずに、データバインディング、条件分岐、繰り返し処理、フォームの双方向バインディング、サーバー通信などを HTML 属性で宣言できます。
4
4
 
5
- バージョン: 0.62.3
5
+ バージョン: 0.63.0
6
6
 
7
7
  ---
8
8
 
@@ -60,6 +60,12 @@ ES Module:
60
60
  import Haori from 'haori';
61
61
  ```
62
62
 
63
+ CSP(Content Security Policy)で `'unsafe-eval'` を許さないページでは、読み込む `<script>` に `data-csp` を書きます(ESM では `Haori.setCsp(true)`)。式を `new Function` を使わずに評価します。推奨する CSP と移行の手順は [仕様書の「Content Security Policy (CSP)」](docs/ja/specs.md#content-security-policy-csp) を参照してください。
64
+
65
+ ```html
66
+ <script src="https://cdn.jsdelivr.net/npm/haori/dist/haori.iife.js" data-csp></script>
67
+ ```
68
+
63
69
  ---
64
70
 
65
71
  ## クイックスタート
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js is a lightweight, HTML-first UI library that enables dynamic user interfaces primarily through HTML attributes. It lets you declare data bindings, conditional rendering, list rendering, form two-way binding, server fetches, and HTML imports without writing much JavaScript.
4
4
 
5
- Version: 0.62.3
5
+ Version: 0.63.0
6
6
 
7
7
  ---
8
8
 
@@ -60,6 +60,12 @@ ES Module import:
60
60
  import Haori from 'haori';
61
61
  ```
62
62
 
63
+ On pages whose Content Security Policy does not allow `'unsafe-eval'`, add `data-csp` to the `<script>` tag (or call `Haori.setCsp(true)` with ES modules). Expressions are then evaluated without `new Function`. See "Content Security Policy (CSP)" in the specification (`docs/ja/specs.md`, Japanese) for the recommended policy and the migration steps.
64
+
65
+ ```html
66
+ <script src="https://cdn.jsdelivr.net/npm/haori/dist/haori.iife.js" data-csp></script>
67
+ ```
68
+
63
69
  ---
64
70
 
65
71
  ## Quick start