You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation seems to imply that injected javascript code can see/use previously injected code, but this does not seem to be the case. From the example:
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): Failed to handle method call result
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): java.lang.NullPointerException: Attempt to read from field 'com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView com.pichillilorenzo.flutter_inappbrowser.FlutterWebView.webView' on a null object reference
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at com.pichillilorenzo.flutter_inappbrowser.JavaScriptBridgeInterface$1$1.success(JavaScriptBridgeInterface.java:55)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at io.flutter.plugin.common.MethodChannel$IncomingResultHandler.reply(MethodChannel.java:179)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at io.flutter.embedding.engine.dart.DartMessenger.handlePlatformMessageResponse(DartMessenger.java:103)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessageResponse(FlutterJNI.java:228)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#com.pichillilorenzo/flutter_inappbrowser(23351): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
The text was updated successfully, but these errors were encountered:
It seems like calls to injectScriptCode are wrapped such that it's not surprising that they don't interact in this way (thought it would be good to document this). injectScriptFile seems like it modifies the document, so I would expect it to work.
Documentation seems to imply that injected javascript code can see/use previously injected code, but this does not seem to be the case. From the example:
If I use this code and await the second injection, it gives
ReferenceError: $ is not defined
.A similar test setup:
shows
MIAB got msg: [err, ReferenceError: foo is not defined]
I also see this error, which seems related to https://github.com/pichillilorenzo/flutter_inappbrowser/issues/104
The text was updated successfully, but these errors were encountered: