KellyWiegand
2 years agoOccasional Contributor
How to get custom properties?
Hi,
The elements in our website have some custom properties that cannot be found in TC, how can I get them in script?
I want to fill a field but I don't know which type it is. So I want to write a if-else statement to check the properties of every element.
For example, this field has the property "mask", and I have to fill it as "123-45-6789". But I can't do this if I don't get this custom property.
Is this possible to work? Thank you!
Here's an example,
You can use hasAttribute() and getAttribute() methods.