Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Feb 8, 2023
1 parent 3e66096 commit 65407a6
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 6 deletions.
71 changes: 66 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,73 @@
<script src="./packages/history/dist/cdn.js"></script>
<script src="./packages/alpinejs/dist/cdn.js" defer></script>
<!-- <script src="//cdn.tailwindcss.com"></script> -->
<script src="//cdn.tailwindcss.com"></script>
<!-- <script src="//cdn.tailwindcss.com"></script> -->




<button wire:click.prefetch"...">
Do something
</button>










<div x-data="{ count: $url(1) }">
<button @click="count++">+</button>
<button @click="count--">-</button>

<h1 x-text="count"></h1>
</div>





















<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

<div x-data="{ count: $queryString(1) }">
<input type="text" x-model="count">
<span x-text="count"></span>
</div>

<div x-data="{ users: [{ name: 'lebowski' }] }">
<template x-for="(user, idx) in users">
Expand Down
2 changes: 1 addition & 1 deletion packages/alpinejs/src/directives/x-on.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mapAttributes(startingWith('@', into(prefix('on:'))))

directive('on', skipDuringClone((el, { value, modifiers, expression }, { cleanup }) => {
let evaluate = expression ? evaluateLater(el, expression) : () => {}

// Forward event listeners on portals.
if (el.tagName.toLowerCase() === 'template') {
if (! el._x_forwardEvents) el._x_forwardEvents = []
Expand Down
1 change: 1 addition & 0 deletions packages/alpinejs/src/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { deferHandlingDirectives, directives } from "./directives"
import { dispatch } from './utils/dispatch'
import { walk } from "./utils/walk"
import { warn } from './utils/warn'
import Alpine from "./alpine"

export function start() {
if (! document.body) warn('Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine\'s `<script>` tag?')
Expand Down

0 comments on commit 65407a6

Please sign in to comment.