Host Capabilities
Synchronous checks for what the current host supports. None of them makes a round trip.
isBridgeAvailable()
true inside the dashboard iframe
true when the native bridge exists
isExternalRequestsAllowed()
false
true
isRangePickerSupported()
true
false
isPageActionsSupported()
false
true
Feature-detect method families as well. Newer families — device tags, device files and assets, native screens — can be missing on an older host, so check the method before you build that part of the UI and leave it out when it's missing:
const hasTags = typeof bridge.getDeviceTags === 'function';
const hasFiles = typeof bridge.getDeviceFiles === 'function';Check bridge availability
Tells whether the page runs inside a Blynk host.
bridge.isBridgeAvailable() // → booleanReturns true inside a Blynk host, and false in a plain browser tab or the HTML editor preview. Use it to render placeholder content so the widget still looks meaningful in the editor.
Check external requests
Tells whether widget JavaScript may make outbound HTTP requests.
bridge.isExternalRequestsAllowed() // → booleanWeb: always
false. The widget iframe has a null origin, so the browser blocks cross-origin requests no matter what your code does.Mobile: always
true. Individual requests can still fail because of CORS or the network, so handle rejections.
Check range picker support
Tells whether the
RANGE_PICKERperiod is available for history and map data.
true on web, where the dashboard's own date-range picker drives the time window. false on mobile — there the widget draws its own period control and requests CUSTOM ranges. See Historical & Map Data.
Check page actions support
Tells whether dashboard-page navigation (
getPages,showPage,closePage,closeAllPages) is available.
true on mobile, false on web, where those methods don't exist at all. It is a capability flag, not an authorization check. It does not apply to the native-screen methods (openDeviceInfo and friends), which work on both hosts. See Navigation.
Was this helpful?

