What is the reason that pseudo-selectors in CSS don't have an API for Javascript?
Asked
Active
Viewed 41 times
-1
-
5What do you mean? – VLAZ Mar 07 '20 at 13:56
-
You can't style placeholders for example using javascript... – Hugo Mar 07 '20 at 13:58
-
1I think we can - [How to update placeholder color using Javascript?](https://stackoverflow.com/questions/54749402/how-to-update-placeholder-color-using-javascript) – Zuckerberg Mar 07 '20 at 14:03
-
you can also for pseudo element: https://stackoverflow.com/a/49618941/8620333 – Temani Afif Mar 07 '20 at 14:36
1 Answers
1
I think it is because they are not real.
a pseudo-element represents an element not directly present in the document tree. They are used to create abstractions about the document tree beyond those provided by the document tree.
Zaan Chi
- 161
- 5