DOM Manipulation

HARSHvardhan
Tera Contributor

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 ?

 

2 REPLIES 2

Juhi Poddar
Kilo Patron

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

 

Satoshi Abe
Mega Sage