Skip to main content
Version: 1.x.x

Document Environment

quip.apps.getQuipAppId

Function() => string

Returns the ID representing this app in the Quip namespace. Only call this if you need a globally unique ID to store outside of Quip. For all other uses, please use quip.apps.getRootRecordId instead.

quip.apps.isAppFocused

Function() => boolean

Returns whether or not this app is currently focused in the document.

Relevant Events

quip.apps.getThreadId

Function() => string

Returns the id of the thread containing this app.

quip.apps.isDocumentEditable

Function() => boolean

Returns whether or not the document containing this app is editable.

Relevant Events

quip.apps.isThreadMember

Function() => boolean

Returns whether or not the current user is a thread member. This is different than read-only detection, because in the case of a link-shared document, a user can view a document before becoming a member, which will cause them to start receiving notifications for that thread. Users automatically join the thread if they make an edit.

Applications are expected to prevent any automatic edits (e.g. refreshing data on load) until this returns true, otherwise the automated edit will cause the user to become a thread member without their consent or intention.

When using this property, you'll want to subscribe to any changes so you can keep your local representation up to date.

Relevant Events

quip.apps.getContainerWidth

Function() => number

Returns the width of the app container, in pixels.

Relevant Events

Example


// In your root record constructor:
this.isThreadMember_ = quip.apps.isThreadMember();
quip.apps.addEventListener(quip.apps.EventType.THREAD_MEMBERSHIP_CHANGED, () => {
this.isThreadMember_ = quip.apps.isThreadMember();
this.notifyListeners();
});