
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
declarative-custom-element
Advanced tools
Native declarative way to create a custom webcomponent
Native declarative way to create a custom webcomponent
Since Polymer shadowdom polyfill causes some issues with other libraries (notable with MooTools) I decided to create this clone of the polymer-element
element that doesn't use the shadow dom part.
custom-element
follows a native approach so it's not dependant on any framework to work, so any component built with it will work with both Polymer or X-Tag but it can also be used as standalone just by including only a Custom Elements polyfill like the Polymer one or @WebReflection one , and it will work natively in browsers which supports the document.registerElement
method such as Google Chrome Canary
custom-element
will look for the first template
element inside the component and it will clone its content and attach it to its bodynoscript
attributeextend
constructor
attributeattributes
attributecontent
tag inside template
to define where your element content will appearready
event.created
event.also from the Custom Element Polyfill
attributeChangedCallback
event.attachedCallback
event.detachedCallback
event.The biggest change is that custom-element
do not use shadow dom, since the polyfill was causing some issues with MooTools.
This change will make the component simpler to theme also since all the subtree is exposed now.
Instead of calling Polymer
you will call document.register.tag
instead, the syntax is the same
the $ shortcut will map using data-id
instead of the id
, since otherwise there will possibly be duplicates id
in the page.
it doesn't support publishing attributes via the published options
if no content
element is provided in the template
element, the content will still be appended after the template
contents
Work in progress. Alpha version. Don't try this at home. No Cats has been harmed during the writing of this clone.
FAQs
Native declarative way to create a custom webcomponent
We found that declarative-custom-element 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.