native-web-component

Accessing childNodes of custom elments?

天大地大妈咪最大 提交于 2021-02-10 15:07:05
问题 This might be a bit confusing. I am trying to access innerHTML or childNodes from my custom element. Is it possible to get access to the original DOM structure from the web component import file? BEFORE attachShadow? In the below example I am trying to get access to the src of the two jookah-images from my jookah-gallery import file. Disclaimer: Im a total noob when it comes to shadow DOM and web components so if there are any major mistakes I'd love to understand why. Thanks for any help!

Accessing childNodes of custom elments?

亡梦爱人 提交于 2021-02-10 15:01:25
问题 This might be a bit confusing. I am trying to access innerHTML or childNodes from my custom element. Is it possible to get access to the original DOM structure from the web component import file? BEFORE attachShadow? In the below example I am trying to get access to the src of the two jookah-images from my jookah-gallery import file. Disclaimer: Im a total noob when it comes to shadow DOM and web components so if there are any major mistakes I'd love to understand why. Thanks for any help!

Can I get a button in shadowDOM to submit a form not in shadowDom?

旧街凉风 提交于 2021-01-23 04:59:47
问题 I just ran into an interesting situation where I have a submit <button> inside the shadowDOM of a native custom element that is placed inside a <form> . <form id="one" action="" method="get"> <s-button>Select</s-button> #shadow-root <button>...</button> <button>Outside</button> </form> I also have a <button> as a direct child of the <form> . The child <button> causes the form to submit. But the <button> in the shadow-root does not. In a way I guess this makes sense. But has anyone figured out

Can I get a button in shadowDOM to submit a form not in shadowDom?

為{幸葍}努か 提交于 2021-01-23 04:59:37
问题 I just ran into an interesting situation where I have a submit <button> inside the shadowDOM of a native custom element that is placed inside a <form> . <form id="one" action="" method="get"> <s-button>Select</s-button> #shadow-root <button>...</button> <button>Outside</button> </form> I also have a <button> as a direct child of the <form> . The child <button> causes the form to submit. But the <button> in the shadow-root does not. In a way I guess this makes sense. But has anyone figured out

Can I get a button in shadowDOM to submit a form not in shadowDom?

僤鯓⒐⒋嵵緔 提交于 2021-01-23 04:58:52
问题 I just ran into an interesting situation where I have a submit <button> inside the shadowDOM of a native custom element that is placed inside a <form> . <form id="one" action="" method="get"> <s-button>Select</s-button> #shadow-root <button>...</button> <button>Outside</button> </form> I also have a <button> as a direct child of the <form> . The child <button> causes the form to submit. But the <button> in the shadow-root does not. In a way I guess this makes sense. But has anyone figured out

Typescript error “Property does not exist on type 'JSX.IntrinsicElements'” when using native web component

与世无争的帅哥 提交于 2020-06-24 16:42:27
问题 I'm working with a project that uses React and Typescript, but I want to start using native web components in my project to phase out some of my React components. I'm getting this error when I try to include use a person-info component in some of my JSX. Property does not exist on type 'JSX.IntrinsicElements' I've looked at some of the other questions that have had these issues, but none of them seem to have anything to do with native web components in particular. How do I get Typescript and

Typescript error “Property does not exist on type 'JSX.IntrinsicElements'” when using native web component

假装没事ソ 提交于 2020-06-24 16:42:25
问题 I'm working with a project that uses React and Typescript, but I want to start using native web components in my project to phase out some of my React components. I'm getting this error when I try to include use a person-info component in some of my JSX. Property does not exist on type 'JSX.IntrinsicElements' I've looked at some of the other questions that have had these issues, but none of them seem to have anything to do with native web components in particular. How do I get Typescript and

Typescript error “Property does not exist on type 'JSX.IntrinsicElements'” when using native web component

怎甘沉沦 提交于 2020-06-24 16:42:08
问题 I'm working with a project that uses React and Typescript, but I want to start using native web components in my project to phase out some of my React components. I'm getting this error when I try to include use a person-info component in some of my JSX. Property does not exist on type 'JSX.IntrinsicElements' I've looked at some of the other questions that have had these issues, but none of them seem to have anything to do with native web components in particular. How do I get Typescript and