Bucking the expected structure, looking for something better
41 views
Skip to first unread message
admls
unread,
Feb 7, 2019, 5:15:11 PM2/7/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWikiDev
Hi Folks,
I'm trying to add event listeners to tiddlers by tag. What I've done is defined a global module with the event handlers and then made a javascript macro that climbs the DOM tree to get the tiddler frame and adds the event listener to that. Then there's some event delegation to handle everything within. The appropriate macro is then simply transcluded into all the tiddlers with the appropriate tag. This works just fine because the macro get run whenever the tiddler gets refreshed and the event listener gets a attached to the refreshed element. But it strikes me as antithetical to the logic of Tiddlywiki. So I guess I am wondering what's the most tiddlywiki way to add event listeners to tiddler-frames by tag. Is there an established way to do this?
Regards,
Adam
admls
unread,
Feb 7, 2019, 6:25:33 PM2/7/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWikiDev
Just realized that the title is ambiguous. My current plugin structure is ignoring tiddlyiki logic. I'm looking for a solution that is more consistent with tiddlywiki.