
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@isoftdata/svelte-context-menu
Advanced tools
 A Context/Dropdown menu component, filled with [DropdownItem](DropdownItem.md)s and [DropdownCheckboxItem](DropdownCheckboxItem.md)s
A Context/Dropdown menu component, filled with DropdownItems and DropdownCheckboxItems
pnpm 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={e => {
event.preventDefault()
cm.open(e, "target")
}}
>
Right Click to Open Menu
</button>
<ContextMenu bind:this={cm}>
<DropdownItem
icon="mouse"
onclick={() => alert("Dropdown Item Clicked!")}
>
Click Me!
</DropdownItem>
<div class="downdown-divider" />
<h6 class="dropdown-header">Clicked {cmClicks} time(s)</h6>
</ContextMenu>
FAQs
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
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.