formFactor( )


Gets what kind of device is being used to view the page.

Note: This property only checks the site visitor's device, and not which Studio Editor's breakpoint they are using.

The formFactor property gets one of:

  • "Desktop": When viewed in a desktop browser.
  • "Mobile": When viewed in a mobile browser.
  • "Tablet": When viewed in a tablet browser.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<string>
Did this help?