diff --git a/modules/gpad/RCanvasPainter.mjs b/modules/gpad/RCanvasPainter.mjs index 0fa79a1b3..2a2fc1b44 100644 --- a/modules/gpad/RCanvasPainter.mjs +++ b/modules/gpad/RCanvasPainter.mjs @@ -9,7 +9,6 @@ import { RAxisPainter } from './RAxisPainter.mjs'; import { RFramePainter } from './RFramePainter.mjs'; import { RPadPainter } from './RPadPainter.mjs'; import { addDragHandler } from './TFramePainter.mjs'; -import { WebWindowHandle } from '../webwindow.mjs'; /** @@ -303,7 +302,7 @@ class RCanvasPainter extends RPadPainter { if (!isFunc(this.showUI5Panel)) handle.send(reply + 'false'); else { - const conn = new WebWindowHandle(handle.kind); + const conn = handle.createNewInstance(); // set interim receiver until first message arrives conn.setReceiver({ diff --git a/modules/webwindow.mjs b/modules/webwindow.mjs index 57f673e2f..569026296 100644 --- a/modules/webwindow.mjs +++ b/modules/webwindow.mjs @@ -810,6 +810,12 @@ class WebWindowHandle { } } + /** @summary Create new instance of same kind + * @private */ + createNewInstance() { + return new WebWindowHandle(this.kind); + } + } // class WebWindowHandle