@DavidWilla it seems you can build such a thing based on CSS and JS: https://www.w3schools.com/howto/howto_js_image_magnifier_glass.asp
In this case it maybe possible to use DOM and CSS to do the job...
Or you take JS framework and wrap it with JsInterop: https://mark-rolich.github.io/Magnifier.js
@rdeangelis83
private void emitMethodImplementation(JMethod method, JsNameRef functionNameRef,
JsExprStmt methodDefinitionStatement) {
addMethodDefinitionStatement(method, methodDefinitionStatement);
if (shouldEmitDisplayNames()) {
addMethodDefinitionStatement(method, outputDisplayName(functionNameRef, method));
addMethodDefinitionStatement(method, outputFunctionNameProperty(functionNameRef, method));
}
}
private void generatePrototypeDefinitionAlias(JMethod method, JsName alias) {
JsName polyName = polymorphicNames.get(method);
JsExpression bridge = JsUtils.createBridge(method, polyName, topScope);
// Aliases are never property accessors.
generatePrototypeAssignment(method, alias, bridge, JsMemberType.NONE);
}
private JsExprStmt outputDisplayName(JsNameRef function, JMethod method) {
JsNameRef displayName = new JsNameRef(function.getSourceInfo(), "displayName");
displayName.setQualifier(function);
String displayStringName = getDisplayName(method);
JsStringLiteral displayMethodName =
new JsStringLiteral(function.getSourceInfo(), displayStringName);
return createAssignment(displayName, displayMethodName).makeStmt();
}
private JsExprStmt outputFunctionNameProperty(JsNameRef function, JMethod method) {
String displayStringName = getDisplayName(method);
JsStringLiteral displayMethodName =
new JsStringLiteral(function.getSourceInfo(), displayStringName);
JsObjectLiteral descriptor = JsObjectLiteral.builder(function.getSourceInfo())
.add("value", displayMethodName)
.build();
JsStringLiteral prop = new JsStringLiteral(function.getSourceInfo(), "name");
return constructInvocation(function.getSourceInfo(), "Object.defineProperty", function, prop, descriptor).makeStmt();
}
try that out, i think it is close (plus or minus formatting)