Get Space Element

Get Space Element - kintone.space.portal.getContentSpaceElement()

Retrieves the empty space element of a Space Portal's header. The Space must be multi-threaded.
The area is highlighted in red in the image below.

Function

Desktop

kintone.space.portal.getContentSpaceElement()

Mobile

kintone.mobile.space.portal.getContentSpaceElement()

Parameters

  • none

Returns

  • The HTML element of the Space Portal's header.
  • When executed outside of Space display events, this API does not throw an error and may return either null or an element, depending on the page context.
When null is returned

The API returns null when used on the following cases:

  • Guest Spaces
  • When a guest user executes the API
  • Pages where the API cannot be used.

Sample

1
2
3
4
kintone.events.on('space.portal.show', function() {
  var el = kintone.space.portal.getContentSpaceElement();
  el.textContent = 'Hello Kintone!';
});

Available Pages (Desktop)

  • Top portal page of Spaces with the multiple threads option enabled
  • Notification details view that displays the Space Portal

Available Pages (Mobile)

  • Top portal page of Spaces with the multiple threads option enabled

Limitations

  • These APIs are only available for Spaces with the multiple threads option enabled.
  • These APIs are not available for Guest Spaces.
  • The appearance within the space element is not guaranteed to always stay the same. This is because future updates to Kintone's CSS may cause the style within the element to change.