Skip to content

WIP: live @when option#2458

Draft
WebReflection wants to merge 3 commits intopyscript:mainfrom
WebReflection:whenever
Draft

WIP: live @when option#2458
WebReflection wants to merge 3 commits intopyscript:mainfrom
WebReflection:whenever

Conversation

@WebReflection
Copy link
Copy Markdown
Contributor

Description

This MR showcases the possibility to have live listeners via the @when decorator, meaning that as soon as any element that matches that selector gets appended or created and goes live it will automatically have the matching listener attached.

Changes

  • importing manually (main only for the draft/demo) qsa-observer
  • avoiding regular logic when live=True is passed as option/kwargs
  • test manually everything is fine and no duplicated listeners are ever added

Checklist

  • I have checked make build works locally.
  • I have created / updated documentation for this change (if applicable).

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.

2 participants