Firefox addon. I am migrating an existing addon to reboot. I have a panel with a lot of user interface elements (mainly boxes / descriptions and images), and it is very convenient for me to define panel elements in the XUL overlay file. I will have a lot of bloated js code if I don't.
The panel element (parent) itself is created dynamically in the code, and then I use it loadOverlay, wait for the “merged” event, and then add the child elements of the panel element from the overlay document. I also make sure that the items are cleared when deleted.
However, using overlays will most likely not pass the AMO review. And some of the reasons I think of:
- In most cases, overlay elements will cause problems during deletion (for example: buttons on the toolbar, their position, etc.).
- There are problems attaching js / css files in the overlay file.
- loadOverlay is buggy ( 496320 , 330458 )
And here are my findings:
- loadOverlay () API is not outdated - in fact it is “ not frozen and may change later ”, which means that it can be used in the future.
- The error associated with the failure of the second overlay is not applicable in my case, since I do not initialize without merging addition.
- Using a static overlay for preference windows, etc. is perfectly acceptable at the moment.
- ( )
- js/css, , . - .
, , loadOverlay() ? , ?