Skip to content

roca-components/h-embed

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

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

Releases

No releases published

Packages

No packages published