
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@browserkids/web-components
Advanced tools
This is a collection of useful web components helper functions. They are all written in latest/cutting edge ECMAScript 2022 code and are not transpiled.
Fastest way to get going. See for yourself:
<script type="module">
import { define } from 'https://unpkg.com/@browserkids/web-components';
define(class MyElement extends HTMLElement {
/* Your custom element logic. */
});
</script>
Semi-fast way as well. Just install it via npm.
npm install -S @browserkids/web-components
Import the functions where you need them.
import { define } from '@browserkids/web-components';
Almost every function uses at least one feature of ECMAScript 2022 , but no ESNext features — promised. So support should be fine for “evergreen” browsers at the time of writing. This means that Internet Explorer is out of the game.
As this library is not transpiled nor ever will be, you should use polyfills in case you need to support a specific browser version.
The define() helper function registers a custom element constructor to the CustomElementRegistry. To reduce redundant tasks like creating a ShadowDOM, binding attributes, setting up event listeners or fetching DOM references, the given element constructor will be extended and enhanced to have a consistent developing experience.
<my-element></my-element>
<script type="module">
import { define } from 'https://unpkg.com/@browserkids/web-components';
define(class MyElement extends HTMLElement {
// By default define() uses the class name as element name,
// you can override this by defining a custom name.
static name = 'my-element';
// You can define a static settings field to override the settings
// for the individual functions that define() is using.
static settings = {
bindAttributes: {},
bindEventListeners: {},
createShadowRoot: {},
findReferences: {},
};
// Will be used by bindAttributes and turns into a proxy object.
data = {};
// Will be used by createShadowRoot for shadow dom creation.
template = '';
// Will be called once the element has been inserted to the DOM,
// and the constructor of that class has finished.
ready() {}
});
</script>
FAQs
Non-transpiled ES13+ web components helper functions.
We found that @browserkids/web-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.