Client-side code DOM manipulation

Rama Rao
Tera Contributor

Hi,

Which elements are under DOM manipulation in the client script?

Thanks and Regards,

Ramarao

13 REPLIES 13

Martin Ivanov
Giga Sage
Giga Sage

DOM Manipulation is not recommende by ServiceNow at all!

Please Mark Correct AND Helpful. Thanks


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

Hello Martin,

Okay, thanks for the quick response.

How do we know which script under DOM Manipulation and Whick script is not DOM Manipulation?

The simplest answer to this is whenever you try to manipulate html part of your UI using javascript or jQuery that is called DOM manipulation. Restrict yourself to objects available in servicenow and refrain from using document ,$ , gel in client side scripts.

Raghav
MVP 2023

Hello Raghav,

is g_form.showFieldMsg() is under DOM Manipulation? and if it is yes , why?