Native Controls & JS Bridge Functions

A reference guide for controlling native UI elements and triggering JavaScript functions through the WebtoNative bridge.

You'll need to import the javascript file in your website before starting from this link.

1. Trigger JavaScript Functions via URL Scheme

You can call JavaScript functions inside your WebView directly by using the w2n:// URL scheme.

Syntax:-
w2n://jsFunction:YOUR_JS_CODE

Example:-
w2n://jsFunction:alert("Hello World");

This will execute the JavaScript alert("Hello World") inside the WebView.

2. Hide Native Components

You can hide native UI components dynamically using the hideNativeComponents() JavaScript function.

Available Components:

  • secondary_navigation

  • admob

  • floating_button

  • connect

  • bottom_navigation

  • advanced_bottom_navigation

  • header

Syntax:-
hideNativeComponents(["component1", "component2"]);

Example:-
hideNativeComponents(["bottom_navigation"]);

To hide multiple components:
hideNativeComponents(["bottom_navigation", "header", "admob"]);

3. Show Native Components

You can show native UI components using the showNativeComponents() JavaScript function.

Available Components:

  • secondary_navigation

  • admob

  • floating_button

  • connect

  • bottom_navigation

  • advanced_bottom_navigation

  • header

Syntax:-
showNativeComponents(["component1", "component2"]);

Example:-
showNativeComponents(["header"]);

To show multiple components:
showNativeComponents(["header", "floating_button", "secondary_navigation"]);

Feature taken live on 24/11/25

Last updated

Was this helpful?