New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@packaged-ui/pagelets

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@packaged-ui/pagelets

**[Upgrading from v1 to v2](UPGRADE.md)**

latest
npmnpm
Version
2.6.1
Version published
Weekly downloads
72
-40.5%
Maintainers
2
Weekly downloads
 
Created
Source

Pagelets

Upgrading from v1 to v2

Usage

Initialize

Initialize pagelet events (link clicks and form submissions)

Pagelets.init(options);

Options

PropertyTypeDefaultDescription
selectorstringa[data-uri],button[data-uri],[href][data-target]Which "click" event elements to react to
formSelectorstringform[data-uri],form[data-target]Which "submit" event elements to react to
defaultTargetstringdocument.bodyIf no data-target specified, which container to load the content into
allowPersistentTargetsbooleantrueIf a page has been reloaded, allow pagelets to load into containers of the same name
listenElementNodedocumentListen to links within this container only
minRefreshRateint500Minimum time to wait between pagelet refreshes
iteratorActionIteratornew ActionIterator()set the default iterator

Manual request

Manually make pagelet request

const req = new Pagelets.Request(options);
Pagelets.load(req)
        .then(({request, response}) =>
              {
                // process response (if necessary)
              })
        .catch((e) =>
               {
                 // error handling
               });

Pagelet Options

PropertyTypeDefaultDescription
url [required]StringURL of the resource to request
iteratorActionIteratoruses global optionsaction iterator to use when processing the response
sourceElementElementelement requesting the pagelet
targetElementElement/Stringelement to receive the default pagelet content
pushUrlStringURL to set in the address bar
headersObjectobject containing custom headers for the request
dataObjectobject containing post data
methodStringrequest method to use
withCredentialsBooleanfalseset withCredentials

FAQs

Package last updated on 21 Aug 2025

Did you know?

Socket

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.

Install

Related posts