
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@aofl/component-utils
Advanced tools
A small collection of component utility functions.
npm i -S @aofl/component-utils
import {findParent} from '@aofl/component-utils';
class MyElement extends AoflELement {
...
connectedCallback() {
super.connectedCallback();
this.targetParent = findParent(this, 'addOption'); // register this list option with a parent who supports it
this.targetParent.addOption(this);
}
...
traverseParents()
Finds a parent component which has all the matching attributes
Name | Type | Description |
---|---|---|
node | HTMLElement | The child component |
...args | String | Attribute names that must be found on the parent |
findParent()
Finds a parent component which matches the method signature provided
Name | Type | Description |
---|---|---|
node | HTMLElement | The child component |
...args | String | Method names that must be found on the parent |
findParentByAttributes()
Finds a parent component which has all the matching attributes
Name | Type | Description |
---|---|---|
node | HTMLElement | The child component |
...args | String | Attribute names that must be found on the parent |
isInViewport()
Check whether or not the supplied element is within the visible area of the screen. The threshold values are multipliers of their respective dimension. 0 means the exact viewport dimensions and .5 means viewport + half of viewport.
Name | Type | Description |
---|---|---|
node | HTMLElement | target node |
widthThreshold | String | viewport width multiplier |
heightThreshold | String | viewport width multiplier |
isInViewportMixin()
Mixes the superClass with functions necessary to detect if the element is within the visible area of the page.
firstWithinViewport()
is invoked when element scrolls into view for the first time.withinViewportUpdated(newValue, oldValue)
withinViewportUpdated() is invoked anytime the element enters or exists the viewport.stopIsInViewportCheck()
when invoked it removes the event listeners and stops invoking the withinViewportUpdated() function. This is useful when we want to disconnect the event listeners and keep the component attached to dom. For example, conside lazy loading images with aofl-img. Once the image is loaded it is no longer necessary to check isInViewStatus.FAQs
A small collection of component utility functions
We found that @aofl/component-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.