Package Exports
- be-it
- be-it/be-link-valued.js
Readme
be-it
be-it is a vaguely named custom enhancement for DOM elements, whose mission is rather obscure but quite important. It allows deriving and forwarding microdata settings / values from meta and link tags to and from properties of other DOM (custom) elements.
This allows applications to hydrate without having to pass and parse data separately, and provide search engines with accurate information.
It works well with other custom enhancements, including be-sharing and be-linked:
<div itemscope
be-scoped='{
"count": 30,
"description": "Mr. Banks flying a kite with his kids.",
"isHappy": true
}'
be-sharing='
Share * from scope.
'
>
<link itemprop=isHappy be-it=disabled>
<meta itemprop=count be-it=maxLength>
<input>
<meta itemprop=description be-it=alt>
<img>
</div>be-it also supports hydrating the value in the opposite direction:
<link be-it=disabled>
<meta itemtype="https://schema.org/Number" be-it=maxLength>
<input disabled maxlength=37>...updates the microdata so it matches the initial values of the input element.
Viewing Your Element Locally
- Install git.
- Fork/clone this repo.
- Install node.h
- Open command window to folder where you cloned this repo.
npm install
npm run serve
- Open http://localhost:3030/demo/ in a modern browser.
Running Tests
> npm run test