I am looking into structuring vanilla web-components. I have previously used Polymer and like the fact that you can have the template, styles and JavaScript in one file for your component. I want to achieve this with 'vanilla' web components...
Consider, I have few elements which use Shadow DOM to hide their internal div-soup and layout.  Even tough they are different, they share the same CSS style sheet, as they are using the same set of elements that are supposed to be styled in consisten...
I'm trying to detect whether a custom element with a specific name was registered or not. Is there a way to make such check?  Or is there a way to get list of registered custom elements?  I do document.registerElement, but what else is there? Is...
In Javascript, I am trying to dynamically create an HTML <template> element, append an <h1> element as its child, clone the template's contents, and then append the template to the document body.  The problem is when I access the cont...
I'm playing around with v1 web components. According to Eric Bidelman in Custom elements v1: reusable web components, a v1 web component can be defined and created with:  class App extends HTMLElement {    attachedCallback() {     this.attachShad...
Context:  I am carrying out tests about web component composition in different contexts. Particularly I am trying to relate several web component by getting access to one of them from another one by a searching process within the DOM / Shadow DOM of...
I am using ES5 to make a custom web component that extends HTMLAnchorElement. Since web components only work in ES6 and up I have included the ES5 polyfill located here.  Making a web component that extends HTMLElement and then using its tag on the p...
I'm reviewing this Angular 5 forms youtube tutorial and in it Sebastian initially has the form selector named app-form01, but he removes the app- portion.  IIUC custom elements are supposed to have the -.  Has this been relaxed?...
Using Web Components without any framework, what is the proper way to implement a custom event? For example, say I have a custom element x-pop-out that has a custom event of pop I would want all of the following to work:  <x-pop-out onpop="som...
I've been developing with polymer and I've always put my <script> tags inside my <dom-module> tags. E.G:  <dom-module id="">   <template>     <style>     </style>    </template>   <script&g...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.