Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
be-based
Advanced tools
Readme
[TODO] Using MountObserver
be-based is a package that allows a DOM document fragment filled with relative URL paths, to be adjusted based on a base URL. This is quite critical when streaming HTML from a third-party element to a DOM node contained within the Live DOM tree. be-based plays a critical role in combination with be-written.
<div be-based="https://www.supremecourt.gov/about/">
<a href="biographies.aspx#SOConnor">O'Connor, Sandra Day</a>
<div>
is shorthand for:
<div be-based='{
"base": "https://www.supremecourt.gov/about/",
"forAll": ["href", "src", "xlink:href"]
}'>
<a href="biographies.aspx#SOConnor">O'Connor, Sandra Day</a>
</div>
be-based rewrites the attribute within:
<div is-based="https://www.supremecourt.gov/about/">
<a href="https://www.supremecourt.gov/about/biographies.aspx#SOConnor">O'Connor, Sandra Day</a>
</div>
be-based also takes it upon itself, in the absence of any apparent alternatives, to make the same Declarative Shadow DOM syntax that works when streaming HTML to the browser, to also work while streaming a separate HTML fetch request to a DOM element.
Another service be-based provides is it can be subscribed to for any CSS matches it encounters. This feature is used by be-rewritten.
be-based is one of a growing family of be-decorated web component based custom attributes / behaviors / decorators / directives.
By referencing be-based.js, elements with attribute be-based will be discovered and transformed.
Or we can reference index.js, which loads both trPlugin.js (template instantiation plug-in) and be-based.js in parallel.
The element be-based can decorate is not limited to template elements. It can be applied to any DOM element.
If using stream-orator to stream HTML to a target element, be-based can be used to watch all new elements, and apply all the rules as they are discovered.
This seems to work quite well with Chromium based browsers running on windows (rewriting image url's before the browser tries the original, invalid url), but isn't so effective with Firefox.
Update: Well, on Chromium based browsers, it doesn't seem so reliable either, at least depending on when I try.
W3C willing.
FAQs
be-based is a package that contains a client-side web component decorator, a trans-render transformer [TODO], and a HTMLRewriter class [TODO].
The npm package be-based receives a total of 7 weekly downloads. As such, be-based popularity was classified as not popular.
We found that be-based 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.