window.WebView object is not available / not injected

Hello. I am using Kodular Creator 2025.8.

In my app, I have a WebViewer component. I need to communicate from my external website (JavaScript) to the app’s blocks using the WebViewString.

However, the window.WebView object is always undefined inside my page. The check if (window.WebView) is always false.

In the WebViewer Properties, I have already checked that JavaScriptEnabled and FollowLinks are both set to true.

How can I enable or fix the injection of the window.WebView object so I can use window.WebView.SetWebViewString()? Is there a new property or method in version 2025.8?

Thank you.

According to the Kodular Web Viewer documentation, See here

In the WebViewer, you include Javascript that references the window.Kodular object, using the methods getWebViewString() and setWebViewString(text)

So i think your JS should do things like,

      window.Kodular.setWebViewString("hello from JS");
      let s = window.Kodular.getWebViewString();

If instead you are trying window.WebView or window.WebView.setWebViewString(...), that won’t work because the injected interface is named Kodular

In older App Inventor / related stacks, people often used window.AppInventor.setWebViewString(...)

See here

1 Like