Skip to content

feat: custom dom events#38

Merged
franverona merged 9 commits intodevelopfrom
feat/custom-dom-events
Apr 8, 2026
Merged

feat: custom dom events#38
franverona merged 9 commits intodevelopfrom
feat/custom-dom-events

Conversation

@franverona
Copy link
Copy Markdown
Owner

@franverona franverona commented Apr 8, 2026

#22

  • Native CustomEvent dispatching across all lifecycle methods in both implementations
  • Full TypeScript types (LoadgoEventMap, augmented HTMLImageElement.addEventListener)
  • Interactive demo pages for jQuery and Vanilla JS
  • README and CLAUDE.md documentation
  • $filter renamed to filter in jQuery _setprogress
  • loadgo:options detail is now a shallow copy (prevents internal state mutation)
  • setprogress() dispatches loadgo:error on uninitialized elements
  • resetprogress() guards against uninitialized elements (prevented spurious loadgo:reset)
  • Tests for all new error paths (263 passing)

Events

Event Fires when event.detail
loadgo:init init() completes
loadgo:error invalid usage (non-img element, loop/stop on uninitialized, double loop) { message: string }
loadgo:options options() is called as a setter after init merged LoadgoOptions object
loadgo:progress setprogress() is called { progress: number }
loadgo:complete progress reaches 100 outside of a loop { progress: 100 }
loadgo:reset resetprogress() is called { progress: 0 }
loadgo:start loop() starts
loadgo:cycle loop completes one full back-and-forth (bounces back to 0)
loadgo:stop stop() is called { progress: 100 }
loadgo:destroy destroy() completes

@franverona franverona merged commit e185a6e into develop Apr 8, 2026
3 checks passed
@franverona franverona deleted the feat/custom-dom-events branch April 8, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant