Web-component Questions
Ad
How To Set An Attribute Of A Web Component Dynamically
I am stuck on trying to set an attribute for a custom web component called ws-dialog i designed. it always adds an attribute
"Failed to execute 'querySelector' on 'Document': 'class MyComponent extends HTMLElement" during Karma test
I am getting the error mentioned in this question head. i don't understand why i can't check if certain div id is available. it is quite simple
React useRef Hook with Flow Typings
I'm using react useref with flow typings and i'm trying to write a wrapper component for a third party web components library. the web
How to choose where children of a custom element will be located?
Hello i have a custom webcomponent and i want to decide where to put the children inserted by the upper (parent) element. file of upper
Is there a counterpart to Angular "slots" for DOM nodes in React?
The goal is to create a w3c
Web components and JS DOM Elements with a placeholder
Lately, everyone is jumping on the web component train for framework-agnostic ui elements. while i am doing my reading on this, it looks a native
react: dispatch and listen to custom events
I would like to integrate web components into my react app. they define a set of custom events that the enclosing react app must listen to.
how to make a method that push items to empty array with lit-element
I have an empty array with lit-element to add the ages between 2 to 13 years that i generate with a loop. i need to add each element within the
ReactJS - Disabling a component
I need to disable postlist component in its initial state. import react from 'react'; import postlist from
How to provide a fallback CSS-value within a custom element?
I have a custom web-component which is basically an svg-icon: <custom-icon> <svg>{svg-stuff}</svg>
Ad
bundle size: Is it possible to set lit-element as a peer dependency?
I noticed there is much code added to the bundled js for a simple lit-element based web component, and react components set react as a peer
Applying more in depth selection to the :host CSS pseudo class
I am making a custom element and have been searching for a way of adding more specificity to the :host pseudo class which is
LitElement: best practise (or best performance) when creating many custom style rules vs a couple of dynamic rules inside a tiny web component?
So i'm working on a very small web component to feature as part of a much larger design system. i'm a bit new to use of web components,
React Wont Caching Results of API request in Local storage
I'm trying to build a very simple component in react that requests an image from an api and subsequently stores / caches
Is it bad practice to create a web-component inside another and append it to said other?
Essentially i have a web component "x" and i dynamically create a form component inside the "x" which will be appended to "x". i could
How to render React childrens from a StencilJS parent?
In the project i work on we are migrating all the ui components to stenciljs so that they are framework agnostic. the problem i'm having is that
Styles are not applied to the LitElement in Safari/Firefox
Update from 01.2020: it should be fixed with
What exactly are the css boundaries in web components?
<html> <style> body { color: blue; } </style> <body>
Custom Elements are not getting marked when hovering over them with Chrome DevTools
I have a main html file where i embedd web components. when debugging i noticed, that my custom elements are not marked, when i hover over them.
Importing and running a standalone React application inside a web component
I have a standalone react application that uses webpack for bundling with a requirement of being able to run this bundle within a web component.
custom element: attribute won't update component state
I'm new with web component and i've a problem when i write a component in html and add an attribute directly in html. the problem is that the
Ad
How to update components created inside a JSX.Element?
I have a root component as: const entermobilenumberpage: react.fc = () => { return ( <div
Getting an element reference in a Custom Element
Say i have a custom element. it consists of two parts, a button to open and toggle a menu and the menu itself. i want to position the menu
Web Components in Different Frameworks
I want to create custom web components and use them in variety of frameworks like angular, react and vanilla javascript. my question is
Using web component without registering as a custom element?
Is it possible to instantiate a web component without registering it to the customelementregistry? consider a simple component:
custom element type reports HTMLElement when loaded in script type=module?
I'm working with custom elements and i noticed in one case i was unable to access the properties of an instance as in var prop =
Is there any possibility to use the css classes of twitter bootstrap in shadow dom?
Is there any possibility to use twitter bootstrap inside shadow dom? at this point, a major advantage turns out to be a disadvantage.
Components Library - Show Index
I'm building a repository of reusable react components that would be shared between several internal projects. i'd like to have an index file
Disable entire month in vaadin date picker
I am trying to disable all dates of all months in vaadin-date-picker. while looking through the code, i found that i can individually disable
Extending a html component get attributes are not working
This is my code for custom webcomponent creation. import s3uploader from 'containers/s3uploader'; import react from 'react';
LitElement get updated attribute value when property set to new value
I want attribute should update when property was set to new value. so what i did is to call the element.requestupdate() so that i can
Webpack - Compile two output bundles with different asset paths
I'm trying to build a website using webcomponents. the problem is, i need two different bundles with different paths to the images in css. the
Ad
Custom element template tag is not rendering canvas tag element
Html tag template is not rendering canvas tag element class barchart extends htmlelement { connectedcallback() { let
How to create bidirectional binding from vue.js instance to custom native web component?
Below is an example for a custom web component my-input. i would like to bind the value attribute of my custom input component to the
Why do I get two console logs while its should be just one ? react js
I have a simple section in react which contains two buttons logo and banner, on click i am opening a simple modal from web component, now i want
Unregister custom element
Is it possible to unregister a custom element that has been created by createcustomelement? we use web components to wrap out vertical
How to access observedAttributes on Web Components
So in web components you can use the
Event example from Polymer 3 devguide "Listener on outside elements" throws an exception
I've created example for the
What is the best way to export modules with submodules in (Vue, React)
What is the best way to export a module that includes submodules using an index.js. for a long time now i follow a pattern on naming
addEventListener in a React app isn't working
Some background: i'm trying to consume a custom web component in a react app and trying to listen to events from
WebComponent setter not triggered if defer is used
I recently noticed that a setter in a web component is not being called when you inject the webcomponent javascript file with a script tag where
Custom web component that acts like a link (anchor tag)
I created a custom web comonent button, that has a href attribute. if one clicks on the button, i use javascript to navigate to its
Vanilla JavaScript event delegation when dealing with Web Components
My current project uses web components (custom elements and shadow dom) which allow me to encapsulate complex logic and styles away from the light
Ad
How to target custom element (native web component) in vue.js?
I have a custom web component treez-tab-folder. as the name suggests it represents a tab folder. here is a jsfiddle and some image to
:host selector not working for custom element having shadow dom
I am trying to create a custom component with shadow dom attached to it. the custom component gets created and gets added to the dom with shadow
How are Javascript widgets made without iFrames?
I have a chat widget that i want to embed it other people's websites. it looks just like intercom and all the other chat popups. i want to make
How Web component set values to it's child?
I was trying to create a web component. the component just had a progress. the following is my code.
Best way to consume javascript data blocks with react or web components?
I will be working with legacy software built with microsoft behaviors, and data islands, both no longer supported since ie 10. the middle tier
How do I get the offset coordinates of a container in react.js?
I have a class component which renders a container. i would like to print the offset of that container within the container. the react code below
Lit: nested template doesn't render
I have a really simple template and a simple nested template. unfortunately, my nested template doesn't render anything. i followed the
Create vue components with raw html
I know how to create a vue component constructor with simple html: var foo = vue.extend({ template: '<p>this is
How do I execute a function on-close or on dismiss of <paper-dialog> for Polymer 1.0?
Question: how do i automatically execute a function whenever my <paper-dialog> element
HTMLImports using webcomponenetsjs loads the imports in unexpected order of execution - firefox
I am a newbie to webcomponenetsjs and i have been trying to use htmlimports to import another html into my index.html. since chrome supports html
Nesting web components and mixing it with regular HTML
Is it possible to create independent web components with stencil or polymer and then nest them one within another? also, is it possible to mix
Ad
Modifying attributes from within custom element inside React
I have a custom element being used inside
document.registerElement - Why do we need to specify both 'prototype' and 'extends'?
Consider i want to extend the native button element, and create my own super-button element. as i know, it must follow
How do you test elements that require the light dom to be loaded?
I have an element: <dom-module id="ens-page-router"> <template> <iron-pages
Should my <script> be inside my <dom-module>?
I've been developing with polymer and i've always put my <script> tags inside my <dom-module> tags. e.g:
Content security policy. webcomponent. script src DataURI .Can I override HTTP HEADER by META tag?
I am is developing a plugin for shopify cms. this plugin use webcomponents.js to load polymer scripts via script.src =
Global datastore for Polymer application
I'm creating a global datastore <datastore /> web component for my polymer application. it is responsible to retrieve/alter data from/on a server.
Ad
Blog Categories
Ad