Socket
Socket
Sign inDemoInstall

lforms-loader

Package Overview
Dependencies
3
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lforms-loader

A script for dynamically loading a specified version of lforms onto a web page.


Version published
Maintainers
3
Created

Changelog

Source

[3.0.3] 2024-05-10

Fixed

  • Retry loading the libraries in case of failures.

Readme

Source

lforms-loader

This is a package for loading LHC-Forms (lforms) into a webpage by adding the needed link and script tags to the page.

Exported functions:

  • loadLForms(version, styleCallback, lhcFormsSource): This adds tags to the current page to load LHC-Forms, and returns a promise that resolves when the files have been loaded (or fail to load, in which case the promise will be rejected).

    • version: the version to be loaded (e.g., '33.4.1').
    • styleCallback: (optional) a function to call as soon as the lforms styles are loaded
    • lhcFormsSource: (optional) a base URL from which the lforms files can be retrieved. If not specified, the NLM lhcforms-static website will be used as the source.
  • getSupportedLFormsVersions(): Returns a promise that resolves to an array of the available lforms version strings for the versions supported by this loader script. The versions will be sorted, with the most recent version first.

  • changeLFormsVersion(newLFormsVersion): Handles a selection of a new LForms version by reloading the page to the same URL but with the parameters "lfv" set to the new LForms version. The app should then call the loadLForms function to load that requested version.

    • newLFormsVersion: the new version to switch to (assumed valid)

FAQs

Last updated on 15 May 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc