Sha256: f6a56fb5323e8a8bb3b444fc521833f46cc774f20bcd503b80b707cc7f4b3084
Contents?: true
Size: 407 Bytes
Versions: 20
Compression:
Stored size: 407 Bytes
Contents
import { Controller } from "@hotwired/stimulus" export default class extends Controller { connect() { let event = new CustomEvent("embed-tag:embedded", this.eventOptions) this.element.dispatchEvent(event) } get eventOptions() { let clone = this.element.cloneNode(true) clone.removeAttribute("data-controller") return {bubbles: true, detail: {html: clone.outerHTML}} } }
Version data entries
20 entries across 20 versions & 1 rubygems