Skip to content

Commit 912acc0

Browse files
committed
Elaborate a few examples
1 parent 6ea7250 commit 912acc0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ <h2 class="text-4xl text-blue-700 font-bold col-span-2 col-start-2 mb-4">Princip
137137
{ title: ":on<event>", text: "Add event listener.", example: `&lt;button :onclick="count++"&gt;Up&lt;/button&gt;` }
138138
],
139139
mods: [
140-
{ title: ".debounce-<tick|frame|idle|n>", text: "Defer callback by ms, next tick/animation frame, or until idle. Defaults to 250ms.", example: `&lt;input :oninput.debounce-200="update(event)" /&gt;` },
141-
{ title: ".throttle-<tick|frame|n>", text: "Limit callback rate to interval in ms, tick or animation framerate. By default 250ms.", example: `&lt;div :text.throttle-100="text.length"&gt;...&lt;/div&gt;` },
140+
{ title: ".debounce-<ms>", text: "Defer callback by ms. Defaults to 250ms.", example: `&lt;input :oninput.debounce-200="update(event)" /&gt;` },
141+
{ title: ".throttle-<ms>", text: "Limit callback rate to interval in ms. By default 250ms.", example: `&lt;div :text.throttle-100="text.length"&gt;...&lt;/div&gt;` },
142+
{ title: ".tick", text: "Defer callback to next microtask.", example: `&lt;div :class.tick="{ active }"&gt;...&lt;/div&gt;` },
143+
{ title: ".raf", text: "Throttle callback to animation frame.", example: `&lt;div :style.raf="{&apos;--progress&apos;: progress + &apos;%&apos;}"&gt;...&lt;/div&gt;` },
142144
{ title: ".once", text: "Call only once.", example: `&lt;button :onclick.once="loadMoreData()"&gt;Start&lt;/button&gt;` },
143145
{ title: ".window, .document, .root, .body, .parent, .outside, .self", text: "Specify event target.", example: `&lt;div :onclick.outside="closeMenu()"&gt;Dropdown&lt;/div&gt;` },
144146
{ title: ".passive, .capture", text: "Event listener options.", example: `&lt;div :onscroll.passive="pos = e.scrollTop"&gt;...&lt;/div&gt;` },

0 commit comments

Comments
 (0)