
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@isoftdata/svelte-context-menu
Advanced tools
A Context/Dropdown menu component, filled with [DropdownItem](DropdownItem.md)s
A Context/Dropdown menu component, filled with DropdownItems
npm i @isoftdata/svelte-context-menu
| Name | Type | Description | Default Value |
|---|---|---|---|
| id | string | The id of the context menu element. | "menu" |
| menuItemClickCloses | boolean | Whether clicking a menu item will close the menu. | true |
| placement | string | The placement of the context menu relative to the reference element. | "bottom-start" |
The main way you'll interact with this component is through calling the methods below. To access these methods on the component instance, you will have to use the bind:this directive on the ContextMenu in your template, and assign it to a variable, which you can then call the methods on. See Example for more details.
event - the mouse eventtargetId (optional) the id of an element. If supplied, the menu will be positioned relative to this element. Otherwise, it will be positioned relative to the cursor.<script lang="ts">
import ContextMenu from '@isoftdata/svelte-context-menu'
let cm: ContextMenu
</script>
<button
id="target"
class="btn btn-primary btn-block"
on:contextmenu|preventDefault={e => cm.open(e, "target")}
>
Right Click to Open Menu
</button>
<ContextMenu bind:this={cm}>
<DropdownItem
icon="mouse"
on:click={() => alert("Dropdown Item Clicked!")}
>
Click Me!
</DropdownItem>
<div class="downdown-divider" />
<h6 class="dropdown-header">Clicked {cmClicks} time(s)</h6>
</ContextMenu>
FAQs

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.