https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42150
--- Comment #1 from Paul Derscheid <[email protected]> --- Created attachment 195721 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195721&action=edit Bug 42150: Export registerIsland() for plugin use Add a public API to the islands module so that plugins can register Vue components as custom elements. Plugin JS from the intranet_js hook runs before hydrate() fires, so registrations are picked up during the DOM scan. The function includes a duplicate guard, attempting to register a name that already exists logs a console warning and is a no-op, so plugins cannot overwrite core islands. The WebComponentDynamicImport type is also exported so that TypeScript consumers get type safety. To test: 1. Verify existing islands work unchanged: a. Navigate to Administration and confirm admin-menu renders. b. Navigate to Acquisitions and confirm acquisitions-menu and vendor-menu render. 2. Create a test plugin with an intranet_js hook that outputs a module script calling registerIsland() with a simple inline Vue component served via static_routes. 3. Place the matching custom element tag in a template. 4. Load the page and verify the component renders. 5. Open the browser console and verify no errors. 6. Call registerIsland() with an already-registered name and verify the console warning appears and the original component is unchanged. 7. Remove the custom element tag from the template and verify the component is not loaded unnecessarily. 8. Sign-off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
