Skip to content

Domo.js Library

Cory Klein edited this page Nov 20, 2014 · 1 revision

Table of Contents

The domo.js library provides a set of common tools to assist in building a Domo App Design.

Environment Data

Some meta-data specific to Domo is passed into the card as query parameters in the iframe.

<iframe src="//85992d26-6d77-4c99-95e2-7284ecbbdcb0.domoapps.prod2.domo.com?userId=2133179061&customer=dev&locale=en-US&environment=dev3&platform=desktop&size=large">

The domo.js library parses and exposes these in the domo.env object.

userId

An id unique to the user that is viewing the card.

domo.env.userId // Example: 2133179061

customer

The name of the customer on which the app has been installed.

domo.env.customer // Example: dev

locale

The locale set on the customer that the app is installed with.

domo.env.locale // Example: en-US

environment

The environment that the app is running on. This may be useful for hiding features that are not ready for production yet.

domo.env.environment // Example: dev3

platform

The platform that the user is using to view the app. Currently only desktop is supported, but there are plans for mobile to be implemented as well.

domo.env.platform // Example: desktop

size

The size of the card that is used to display the app. Although a Design can specify its default sizing, the user can always override that sizing to make the app smaller or larger.

domo.env.size // Example: large

Home

General

[Command Line Tool](Command Line Tool)

[Domo.js Library](Domo.js Library)

[Error Code Reference](Error Code Reference)

[Manifest Format](Manifest Format)

Migration

[Requesting Data](Requesting Data)

[Unit Tests](Unit Tests)

Clone this wiki locally