- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 08:26 AM - edited 10-25-2024 08:27 AM
Hi everyone,
[noob alert]
Id like to understand the three dots sometimes used in the createCustomElement JSON. For example, in the GIT examples (example-checklist and task-board-example, at the end of the JSON, there is...
...checklistActions,
and
...taskBoardActions
In other examples, the JSON does not eg (agent-assist-item)
Then again, in example-card there is a behaviours array.
I can only assume, by the importing of an "actions" file in the ones that use three dots...
So, what does it do?
Why do the others not use the same convention?
Is there any best practise guidelines with the two?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 08:32 AM
Hi Dan,
The three dots I believe is called the spread syntax in javascript and has a number of different uses. I don't believe we have any ServiceNow specific best practice guidance regarding it as it's a standard JS feature.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 08:32 AM
Hi Dan,
The three dots I believe is called the spread syntax in javascript and has a number of different uses. I don't believe we have any ServiceNow specific best practice guidance regarding it as it's a standard JS feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 01:57 PM - edited 10-25-2024 01:58 PM
Thanks Brad.
I can see now that the "In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created."
Will be applied to the actionHandlers object in the action.js file.
Really appreciate your reply.