DOM Manipulation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 09:46 PM
ServiceNow has recommended us not use DOM manipulation techniques in our health scans however they have not mentioned the alternatives for these methods. Are there any alternatives for using "$", gel, getElementById(), getElementsByClassName() in client scripts ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 10:30 PM
Hello @HARSHvardhan
There are alternatives in client script such as :
var attachments = document.getElementById('header_attachment_list_label');
can be replaced as:
var attachments = g_form.getFormElement('header_attachment_list_label');
"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 01:49 AM
You can use glide form instead of dom manipulation.