Size of package, including custom element behavior framework (be-decorated):
Size of new code in this package:
be-oosoom is a be-decorated-based decorator/behavior that monitors the visibility of the element it adorns. When the visibility changes, it:
- Checks if the element it adorns has property "beOosoom"
- Checks if any other decorators/behaviors adorning the element have virtual property "beOosoom"
For both scenarios, be-oosoom expects the beOosoom property it finds to be a string-valued key to a boolean property that is used by the component or behavior to indicate whether to be "actively engaged" or not. be-oosoom sets the property to true when the element is visible, false when it scrolls out of view (or gets hidden via a details section being closed, for example). If the string starts with ! then the property name after the ! indicates "hibernating" mode, so be-oosoom does the opposite.
- Install git.
- Fork/clone this repo.
- Install node.
- Open command window to folder where you cloned this repo.
-
npm install
-
npm run serve
- Open http://localhost:3030/demo/dev in a modern browser.
import 'be-oosoom/be-oosoom.js';
<script type=module crossorigin=anonymous>
import 'https://esm.run/be-oosoom';
</script>