JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 34
  • Score
    100M100P100Q52501F
  • License LGPL-3.0-or-later

Package Exports

  • @itrocks/xtarget
  • @itrocks/xtarget/xtarget.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@itrocks/xtarget) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads GitHub repo dependents GitHub package dependents

xtarget

Allows you to choose any element in your DOM as a target for your anchors and forms.

Installation

npm i @itrocks/build @itrocks/xtarget

Usage

Include this ESM script into your web page, then specify the target DOM element id into your HTML code:

<script type="module">
    import buildXTarget from '@itrocks/xtarget/build.js'
    buildXTarget()
</script>
<a href="content-to-load.html" target="#here">Load HTML content</a>
<div id="here">Content will be loaded here</div>