
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@pearson-components/component-handler
Advanced tools
Handles registration of new Origami components so that DOM upgrades are handled on page load and elements can be upgraded after initial page load.
This is NOT intended for use as a standalone component, but rather a component library intended for building higher-order components.
Handles registration of new Pearson components so that DOM upgrades are handled on page load, and elements can be upgraded after initial page load.
> npm install @pearson-components/component-handler --save
const componentHandler = require('@pearson-components/component-handler');
document.addEventListener('DOMContentLoaded', () => {
componentHandler.upgradeAllRegistered();
});
Upgrades all registered components found in the current DOM.
Searches existing DOM for elements of the specified component type and upgrades them if they have not already been upgraded.
DropdownMenu
.Upgrades a single element.
class
attribute.<div id="example" class="o-example-component"></div>
// Upgrade the element with ExampleComponent
componentHandler.upgradeElement(document.getElementById('example'));
Allows the consumer to be alerted to any upgrades that are performed for a given component type.
componentHandler.registerUpgradedCallback('ExampleComponent', () => {
// The component was upgraded
});
// The registered callback will be executed when `ExampleComponent` is
// upgraded
componentHandler.upgradeDom('ExampleComponent');
Gets the upgraded element's class instance for the specified component type.
Registers a class for future use and attempts to upgrade existing DOM. This method should be invoked by the Origami component implementation.
ExampleComponent
for o-example-component
.o-example-component
.Origami components should register themselves with the component handler (see examples).
This software is published by Pearson Education under the MIT license.
FAQs
Handles registration of new Origami components so that DOM upgrades are handled on page load and elements can be upgraded after initial page load.
We found that @pearson-components/component-handler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.