Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Social Media Photo by Andrii Ganzevych on Unsplash
uhtml (micro µ html) is one of the smallest, fastest, memory consumption friendly, yet zero-tools based, library to safely help creating or manipulating DOM content.
{ Hole, render, html, svg, attr }
with smart auto-keyed nodes - read keyed or not ? paragraph to know more{ Hole, render, html, svg, htmlFor, svgFor, attr }
, providing keyed utilities - read keyed or not ? paragraph to know moredocument => uhtml/keyed
utility that can be bootstrapped with uhtml/dom
, LinkeDOM, JSDOM for either SSR or Workers supportuhtml/ssr
out there. The uhtml/dom
is also embedded in this export because the Comment
class needs an override to produce a super clean output (at least until hydro story is up and running).uhtml/init
export to have 100% same-thing running on both client or Web Worker / Server. This entry exports { Document, DOMParser }
where the former can be used to create a new document while the latter one can parse well formed HTML or SVG content and return the document out of the box.reactive
field instead of render
, so that const render = reactive(effect)
creates a reactive render per each library, is that the render(where, () => what)
, with a function as second argument is mandatory when the rendered stuff has signals in it, otherwise these can't side-effect properly.
uhtml/reactive
with @webreflection/signal
in it, so that its render
exported function is already reactive. This is the smallest possible bundle as it's ~3.3Kb but it's not nearly as complete, in terms of features, as preact signals are.uhtml/reactive
with @preact/signals-core
in it, so that its render
exported function, among all other preact related exports, is already working. This is a drop-in replacement with extra Preact signals goodness in it so you can start small with uhtml/signal and switch any time to this more popular solution.import init from 'uhtml/init';
import { Document } from 'uhtml/dom';
const document = new Document;
const {
Hole,
render,
html, svg,
htmlFor, svgFor,
attr
} = init(document);
import { render, html, signal, detach } from 'uhtml/preactive';
const count = signal(0);
render(document.body, () => html`
<button onclick=${() => { count.value++ }}>
Clicks: ${count.value}
</button>
`);
// stop reacting to signals in the future
setTimeout(() => {
detach(document.body);
}, 10000);
FAQs
A micro HTML/SVG render
The npm package uhtml receives a total of 1,099 weekly downloads. As such, uhtml popularity was classified as popular.
We found that uhtml demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.