Package
Description
When calling lucide.createIcons, I'd like to have the ability to specify a custom root element, so that only a specific part of the DOM tree is searched for potential icons needing to be created. Currently, it will always search the entire document, even if it's known that only a small part of the page needs to be searched.
While the performance impact of this is probably not very large in most cases, this seems like a low-hanging fruit to avoid doing a whole bunch of unnecessary computational work on bigger pages with lots of DOM nodes.
Use cases
I'm working on a website using HTMX and Alpine, which regularly update the DOM. Currently, after any update that potentially adds an icon to the page, I need triggers that run createIcons on the entirety of the page, even if I know that only a small part of the DOM could have been updated (e. g. a notification or modal).
I believe this would be relevant to anyone building interactive websites using similar technologies, or even old-school PHP/AJAX style architectures.
Checklist
Package
Description
When calling
lucide.createIcons, I'd like to have the ability to specify a custom root element, so that only a specific part of the DOM tree is searched for potential icons needing to be created. Currently, it will always search the entire document, even if it's known that only a small part of the page needs to be searched.While the performance impact of this is probably not very large in most cases, this seems like a low-hanging fruit to avoid doing a whole bunch of unnecessary computational work on bigger pages with lots of DOM nodes.
Use cases
I'm working on a website using HTMX and Alpine, which regularly update the DOM. Currently, after any update that potentially adds an icon to the page, I need triggers that run
createIconson the entirety of the page, even if I know that only a small part of the DOM could have been updated (e. g. a notification or modal).I believe this would be relevant to anyone building interactive websites using similar technologies, or even old-school PHP/AJAX style architectures.
Checklist