Discussion icon indicating copy to clipboard operation
Discussion copied to clipboard

Who is adding shadow-dom elements to my dom?

Open mark-hahn opened this issue 9 years ago • 2 comments

When I put this in as the template ...

<select class="pop-du" v-model="duPop" options="duArr"></select>

I get this in the DOM ...

screenshot 2016-01-20 at 7 04 11 pm

Does anyone have any idea what is adding the shadow dom elements? I doubt it is vue. I also get them on text inputs. I'm guessing it is on any form input. This is really breaking my code because as you can see the options aren't working.

I'm on Vue 0.12.16 and Ubuntu 14.04. I have tried it with all chrome extensions off. I can't find anything googling.

mark-hahn avatar Jan 21 '16 03:01 mark-hahn

As you can see in the screenshot (user-agent) this is your browser added that. ex:

<input type="date" />

In chrome browser you will see nice date picker. And then check that input shadow dom :) You can disable in dev tools settings.

FDiskas avatar Sep 30 '16 15:09 FDiskas

This is the beauty of Web components 😄

@mark-hahn most of the "native" inputs and the newest elements in Chrome are made using the web components technology (In this case at least Custom Element and Shadow DOM)

yordis avatar Feb 12 '17 23:02 yordis