File tree Expand file tree Collapse file tree
main/resources/dev/webview/webview_java/bridge
test/java/com/example/webview_java Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,11 @@ const Bridge = {
106106 root = root [ part ] ;
107107 }
108108
109- root [ propertyName ] = proxy ;
109+ Object . defineProperty ( root , propertyName , {
110+ value : proxy ,
111+ writable : true ,
112+ configurable : true
113+ } ) ;
110114 } ,
111115
112116 get ( id , property ) {
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ public static void main(String[] args) {
5151
5252 public static class TestObject extends JavascriptObject {
5353
54+ public final NestedTestObject nested = new NestedTestObject ();
55+
5456 @ JavascriptValue (allowSet = false , watchForMutate = true )
5557 public long nanoTime = -1 ;
5658 {
@@ -71,4 +73,13 @@ public void ringBell() {
7173
7274 }
7375
76+ public static class NestedTestObject extends JavascriptObject {
77+
78+ @ JavascriptFunction
79+ public void test () {
80+ System .out .println ("Test" );
81+ }
82+
83+ }
84+
7485}
You can’t perform that action at this time.
0 commit comments