1ec5 / avim

Vietnamese input method extension (IME) for Firefox, Thunderbird, SeaMonkey, Komodo, etc. — bộ gõ tiếng Việt dành cho Firefox, Thunderbird, SeaMonkey, Komodo, …
http://avim.1ec5.org/
MIT License
46 stars 4 forks source link

Make AVIM restartless #9

Open 1ec5 opened 10 years ago

1ec5 commented 10 years ago

AVIM should be a restartless extension.

This task primarily consists of converting the complex web of overlays into functions that programmatically build AVIM’s UI. We’re partway there with the new toolbar.

Upon installation, bootstrap.js would manually build the UI in every existing window and register for new windows using FUEL/STEEL.

Upon uninstallation, it would delete window.avim from every existing window, remove UI, and remove the new window listener. The XPCOM component probably doesn’t need any changes.

1ec5 commented 9 years ago

(Moved to #132.)

1ec5 commented 9 years ago

In true AVIM fashion, as soon as you enable or disable the extension, it takes effect throughout the application – no need to reload any webpages. However, the event handlers still fire after AVIM is disabled, triggering silent JavaScript errors as they try to talk to the window’s AVIM controller, which has already been unloaded.