Touch script interface
ITouchObjectType interface derives from IObjectClass to add APIs specific to the Touch plugin.
Note this class derives from the object class interface, not the instance interface. Typically it is used through
runtime.touch instead of the named object.
- async requestPermission(type)
- Request permission to use device orientation or motion sensors. The
"devicemotion" events will not fire unless this method has been called and permission granted. type must be
"motion". The user may be prompted to allow permission. Note some browsers merge both types in to one permission prompt in which case only one permission request is necessary to access both orientation and motion. Returns a promise that resolves with
"granted" if permission was allowed, else
"denied" if the user declined.
Construct 3 Manual
You are here:
Search this manual:
This manual entry was last updated on 14 Aug, 2019 at 12:28