Pull To Refresh API
Enable or disable pull-to-refresh using the WebToNative JavaScript API. Improve app navigation with dynamic refresh controls for Android and iOS.
Lets users refresh the current page by pulling down on the screen — the standard native "swipe down to reload" gesture. It's enabled by default on every page and can be toggled at runtime from JavaScript. It can also be turned on/off and scoped to specific pages from the WebToNative dashboard, without any code changes.
You'll need to import the javascript file in your website before starting from this link.
Enable / Disable
Enables or disables pull-to-refresh at runtime. Takes effect immediately on the current page.
window.WTN.enablePullToRefresh(true);import { enablePullToRefresh } from "webtonative";
enablePullToRefresh(true);Parameters:
status
Boolean
Yes
true enables pull-to-refresh, false disables it.
Does not persist across navigation: This call sets a temporary, in-memory override for the current page. On the next page load, the app re-applies whatever is configured on the dashboard (see below) and may override what you just set. Call
enablePullToRefreshagain after each navigation if you need the override to stick.
Scoping to Specific Pages (Dashboard)
Pull-to-refresh can also be turned on/off, or limited to specific pages, from the WebToNative dashboard — no code required. This is useful for disabling it on pages with their own internal scroll/refresh UI while keeping it enabled everywhere else.
Notes:
Default state is enabled on all pages unless changed on the dashboard.
The runtime JavaScript toggle and the dashboard setting are not independent — the dashboard setting takes over again on every page navigation, so treat
enablePullToRefreshas a per-page override rather than a persistent setting.Feature was taken live on Android on May 17, 2023, and on iOS on August 12, 2026.
Last updated