--- title: Adding parameters --- Like transitions and animations, an action can take an argument, which the action function will be called with alongside the element it belongs to. Here, we're using a `longpress` action that fires an event with the same name whenever the user presses and holds the button for a given duration. Right now, if you switch over to the `longpress.js` file, you'll see it's hardcoded to 500ms. We can change the action function to accept a `duration` as a second argument, and pass that `duration` to the `setTimeout` call: ```js export function longpress(node, duration) { // ... const handleMousedown = () => { timer = setTimeout(() => { node.dispatchEvent( new CustomEvent('longpress') ); }, duration); }; // ... } ``` Back in `App.svelte`, we can pass the `duration` value to the action: ```html