0.0.5 • Published 2 years ago

be-focused v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

be-focused

Playwright Tests

Size of package, including custom element behavior framework (be-decorated):

How big is this package in your project?

Size of new code in this package:

<button be-focused></button>

... sets the focus on the button when the behavior attaches.

This is useful when HTML is added post page-load.

Setting focus on an element within TODO

<div be-focused=.primary-button>
    ...
    <button class=primary-button>
</div>

Setting focus on mouse hover overTODO

<div be-focused='{
    "when": {
        "mouseHover": true
    }
}'>

Setting focus on mouse hover over closest TODO

<div be-focused='{
    "what": ".primary-button",
    "when": {
        "mouseHover": {
            "closest": "section"
        }
    }
}'>

Media query support TODO