@ -203,6 +203,10 @@ public class ModernUIPane<T> extends BasicPane {
this.pane = new ModernUIPane<>(browserType);
}
public Builder(ModernUIPane<T> pane) {
this.pane = pane;
public Builder<T> prepare(ScriptContextListener contextListener) {
pane.browser.addScriptContextListener(contextListener);
return this;
@ -206,6 +206,10 @@ public class NewModernUIPane<T> extends ModernUIPane<T> {
private NewModernUIPane<T> pane = new NewModernUIPane<>();
public Builder() {
super((ModernUIPane<T>)null);
public NewModernUIPane.Builder<T> prepare(InjectJsCallback callback) {
pane.browser.set(InjectJsCallback.class, callback);