
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Dependency free focus manager with built-in universal key navigation.
npm i --save aim
Register your focusable targets with Aim and Aim will map these into a virtual table-esque view.
Aim will now listen for key events, delegate these to the currently focused target and execute default cursor navigation if not prevented by target handlers.
aim.register({
onFocus (target) {
// fires when target is focused
// return false to prevent focus
},
onBlur (target) {
// fires when target is unfocused
},
onRight (target) {
// fires when right is pressed
// return false to prevent default behaviour (ie. moving cursor to the right)
},
onEnter (target) {
// fires when enter is pressed
}
}, [0, 0, 1])
Registers target on given position.
Param | Type | Description |
---|---|---|
target | Object | Target containing handlers. |
position | Array | Coordinates for position. |
Unregisters target.
Param | Type | Description |
---|---|---|
target | Object | Target to unregister. |
Update properties for given target. Can be used for repositioning / resizing targets.
Param | Type | Description |
---|---|---|
target | Object | Target to update. |
property | String | Property to update, eg. x or y . |
value | Number | New value of property |
Sets an offsetY value to (holder) target, without updating all individual child nodes. Will be used when calculating left/up/down/right node.
Param | Type | Description |
---|---|---|
target | Object | Target to update. |
value | Number | New value of property |
Same as aim.offsetY() for the x axis.
Get target by position.
Param | Type | Description |
---|---|---|
position | Array | The coordinates to target (eg. [0, 0, 1]). |
Move focus to the left.
Move focus to up.
Move focus to the right.
Move focus to down.
Delegate key event to Aim.
Param | Type | Description |
---|---|---|
event | Object | DOM KeyEvent. |
Fires when target is focused.
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
Fires on target when removing focus.
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
Fires on focused target when user presses "enter".
Param | Type | Description |
---|---|---|
target | Object | Registered target. |
FAQs
Dependency free focus manager with built-in universal key navigation.
The npm package aim receives a total of 1 weekly downloads. As such, aim popularity was classified as not popular.
We found that aim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket investigates hidden protestware in npm packages that blocks user interaction and plays the Ukrainian anthem for Russian-language visitors.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.