PlaySuper LogoPlaySuper
WebView Integration

WebView Setup

Configure the WebView — JavaScript, DOM storage, portrait orientation, and close/back controls

The store is a JavaScript single-page app. This page covers the settings every WebView needs, regardless of platform.

Required settings

SettingRequirementWhy
JavaScriptEnabledThe store is a JavaScript single-page app
DOM storage (localStorage)EnabledThe store persists the player's session in localStorage — it will not function without it
OrientationPortrait, lockedThe store is designed for portrait only

Portrait is mandatory. Lock the screen hosting the WebView to portrait, even if your game runs in landscape.

A blank or broken store page is almost always DOM storage being disabled — check that setting first.

Close and back controls

The store does not close itself — your app owns the screen around it:

  • Wrap the WebView in your own screen with a native close or back button (e.g. a toolbar button) that dismisses it and returns the player to the game.
  • On Android, also handle the hardware/gesture back button: navigate back in WebView history first (webView.canGoBack()), and dismiss the screen only when there is no history left.
  • No close-event handling or URL-scheme interception is needed — unlike the Unity SDK, there is no bridge to wire up.
Back pressed
  ├── WebView has history → webView.goBack()
  └── No history          → dismiss the store screen

Checklist

Before moving on, verify:

  • JavaScript enabled
  • DOM storage / localStorage enabled
  • Screen locked to portrait
  • Native close button dismisses the screen
  • Android hardware back navigates WebView history, then dismisses

Next, drop in a ready-made screen for your platform from Platform Examples.