java-cef icon indicating copy to clipboard operation
java-cef copied to clipboard

Add way to add multiple load handlers to CefClient

Open TMSSassen opened this issue 1 year ago • 1 comments

Currently, CefClient.addLoadHandler is a bit of a misnomer - it would be more accurate to name it setLoaderHandler, as it's only possible to set one load handler, subsequent calls to addLoaderHandler are ignored.

This is inconsistent with regular behaviour of addHandlers/addListeners (e.g. calling Logger.addHandler twice does add two Handlers, not one).

To not have to change any method signatures of CefClient, a convenience class LoadHandlerCollection is created, which itself is a LoadHandler, and calls all its child LoadHandlers when its own handler methods are called.

TMSSassen avatar Jan 14 '24 07:01 TMSSassen

Hey, you should open a pr on bitbucket. Also, I can see one small change fix copyright year 2024. Make sure you also have run the fix style script 😉

1fxe avatar Jan 16 '24 15:01 1fxe