Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Development moved github.com/AlexanderElias/jenie
Curium is a custom web component library/framework. Curium has two main flavors Curium and Curium + Swathe. Curium is your main custom elements library similar to X-tag and Skate. Curium + Swathe is your custom components library plus fancy data binding features in which case it is more like Polymer but more performant and way way smaller.
Swathe Link: github.com/AlexanderElias/swathe
curium.polly.min.js
. This version bundles [webcomponents-lite.js ]Returns an instance of the Curium object.
Properties
Object
Function
Function
Function
Function
Returns an object with all the custom components by there custom tag name. Helps keep the global scope clean.
Properties
Returns a custom component object. Accepts an options object.
Properties
Required Options
String
required (Note must be of format start-end
)Template Options
HTMLElement
DOM elementString
string containing html (Note must begin with a html tag <ANY-TAG>
even an html comment will work)String
path to template using XHR (Note must begin with ./
, /
, or http
)Function
multiline comment inside function function () {/* <template>I can span multiple lines</template> */}
String
querySelector on the current script (Note will not work if Curium.component(options)
is wrapped by function such as event listener)Methods Options
Function
callback fired when custom element is created. Parameter is it's self.Function
callback fired when custom element is created. Parameter is it's self.Function
callback fired when custom element is created. Parameter is it's self.Function
callback fired when custom element is created. Parameter is it's self.Query selector on the current scripts document. Essentially a wrapper for document._currentScript.ownerDocument.querySelector(query)
but in the current html document.
Convenience and compatibility document._currentScript
.
Convenience and compatibility document._currentScript.ownerDocument
.
Basic
Curium.component({ tag: 'c-tag' });
Life Cycle
Curium.component({
tag: 'c-tag',
created: function (self) {
console.log('created');
// manipulate self.template
},
attached: function (self) {
console.log('attached');
// if using XHR templates attached is fired before created other wise it is fired after created
},
detached: function (self) {
console.log('detached');
// fired when element is removed from DOM
},
attributed: function (self, name, oldValue, newValue) {
console.log('attributed');
// fired any time attribute changes
// self.attribute an object that can set or get the target elements attributes
}
});
JS File
var templateString = '<template><p>templateString</p></template>';
var templateMultiline = function () {/*
<template>
<p>templateMultiline</p>
</template>
*/};
Curium.component({
tag: 'c-tag',
template: './template.html', // path to template.html file
template: templateString,
template: templateMultiline,
});
HTML File
<template>
<p>templateQuery</p>
</template>
<script>
var templateElement = Curium.query('template');
Curium.component({
tag: 'c-tag',
template: 'template',
template: templateElement,
});
</script>
Licensed Under MPL 2.0
Copyright 2016 Alexander Elias
FAQs
Curium - Web Component Library/Framework Powerful & Small
We found that curium 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.