diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 09fa2bbc0..5a0ead41e 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -203,6 +203,10 @@ public class ModernUIPane extends BasicPane { this.pane = new ModernUIPane<>(browserType); } + public Builder(ModernUIPane pane) { + this.pane = pane; + } + public Builder prepare(ScriptContextListener contextListener) { pane.browser.addScriptContextListener(contextListener); return this; diff --git a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java index 2c8c891cb..59df782cd 100644 --- a/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java @@ -206,6 +206,10 @@ public class NewModernUIPane extends ModernUIPane { private NewModernUIPane pane = new NewModernUIPane<>(); + public Builder() { + super((ModernUIPane)null); + } + public NewModernUIPane.Builder prepare(InjectJsCallback callback) { pane.browser.set(InjectJsCallback.class, callback); return this;