Skip to content
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.editorconfig
.eslintrc
.gitignore
README.md
index.js
package.json
webpack.config.js

README.md

Usage

<a is="h-embed" href="$uri">$label</a>

will be transformed to

<a is="h-embed" href="$uri" style="display: none;">$label</a>
<div class="h-embed">
    $transclusion
</div>

Options

via DOM attributes

  • container: tag name to use (defaults to "div")
  • fragment TODO
  • cors="true" activates CORS support
  • poll TODO

Alternatives

h-transclude is inspired by h-include, which in turn is based on HInclude.

pjax has similar capabilities, though it's typically used in a different context.

Contributing

  • ensure Node is installed
  • npm install downloads dependencies
  • npm run compile performs a one-time compilation, generating dist/bundle.js
  • npm start automatically recompiles while monitoring code changes
  • npm test checks code for stylistic consistency

note that the basic infrastructure is provided by ES6 seed

You can’t perform that action at this time.