Native Controls & JS Bridge Functions

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

circle-info

You'll need to import the javascript file in your website before starting from this linkarrow-up-right.

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

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

Feature taken live on 24/11/25

Last updated