Skip to content

Instantly share code, notes, and snippets.

View spicychickensauce's full-sized avatar

spicychickensauce

View GitHub Profile
@spicychickensauce
spicychickensauce / view_transitions.exs
Created October 31, 2025 09:58
LiveView View Transitions Demo
Mix.install([
{:phoenix_playground, "~> 0.1"},
# Use this repo: https://github.com/spicychickensauce/phoenix_live_view/tree/implement-view-transitions
# And run `mix assets.build` to get the compiled js files
{:phoenix_live_view, "~> 1.1", path: "../../oss/phoenix_live_view", override: true}
])
defmodule DemoLive do
use Phoenix.LiveView
alias Phoenix.LiveView.JS
@spicychickensauce
spicychickensauce / dom_watcher.ts
Created April 22, 2026 14:00
dom watcher web component
class DomWatcher extends HTMLElement {
observer?: MutationObserver;
previousMatches?: Set<Element>;
constructor() {
super();
this.observer = undefined;
this.previousMatches = new Set();
}
static get observedAttributes() {