mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-11 10:31:42 +00:00
* Fix race condition in plugin library iframe message handling
Introduce a PLUGIN-LIBRARY-READY handshake verb for plugin library iframes.
This ensures that postMessage commands are not prematurely dropped before
the iframe's internal script has fully bound its message listeners.
Retains iframe.onload as a backward-compatible fallback for legacy or
external libraries that do not emit the ready signal.
* add changenote
* feat(plugin-library): add PLUGIN-LIBRARY-READY handshake to plugin library iframe
Add PLUGIN-LIBRARY-READY message emission in libraryserver.js
Signals to parent window when iframe is ready to receive messages
Complements browser-messaging.js PLUGIN-LIBRARY-READY handler
Includes comprehensive tests for callback queueing and handshake flow
Fixes race condition in plugin library iframe message handling
* fix(plugin-library): emit PLUGIN-LIBRARY-READY message on iframe initialization
Emit the PLUGIN-LIBRARY-READY message after the message listener is bound,
signaling to the parent window that the iframe is ready to receive postMessage
commands. This completes the handshake implementation to eliminate the race
condition where messages could be lost before the iframe's script initialization
completes.
* fix indentation
* remove extra space
* remove typo
* refactor(test-browser-messaging): update test descriptions and remove unused code
* lint fix
* fix: correct the update note
title: $:/plugins/tiddlywiki/pluginlibrary/readme This plugin is used behind the scenes by TiddlyWiki to build the plugin library. [[Source code|https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/plugins/tiddlywiki/pluginlibrary]]