I'm trying to inspect the shadow DOM for certain HTML5 controls, like the date picker for the input type="date"
and the actual suggestion dropdown list for inputs bound to a datalist
. Preferably in Chrome, but other browsers will do too.
I've found that by enabling the Shadow DOM setting in Chrome's inspector options allows me to inspect the shadow DOM for the actual input
(which includes the ::-webkit-calendar-picker-indicator
arrow to show the datepicker) but not the datepicker itself:
The same goes for the datalist
. It appears as these controls are not part of the input, but I also can't find them anywhere else in the elements panel.
Is it possible to inspect such elements?
Small edit for clarification: I'm actually looking for which pseudo-classes apply to which controls. There's plenty of sites that list some of them, but I have yet to find a source that manages to list ::-webkit-calendar-picker-indicator
for the datalist
element, which does get applied. I'm looking for more of those sneaky bastards, and the best source for that of course is the horse's mouth.
Looks like the actual picker is loaded in an entirely different layer (basically a different window without the titlebar). So I guess the answer is: no, you can't.
I agree it would be great to be able to customize it. And similar popups too. Mozilla in XUL has display:popup
which is used by context menus, flyout and similar things. Would be definitely great being able to use that in userland content too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With