# Events

## Events:

#### SVG Events:

&#x20;       Full scale DOM event types are supported along with some additional event behaviors like Drag, Zoom, etc.

Events

| Event       | SVG | Canvas | WebGL |
| ----------- | --- | ------ | ----- |
| click       | Yes | Yes    | Yes   |
| dblclick    | Yes | Yes    | Yes   |
| mousemove   | Yes | Yes    | Yes   |
| mousedown   | Yes | Yes    | Yes   |
| mouseup     | Yes | Yes    | Yes   |
| mouseleave  | Yes | Yes    | Yes   |
| contextmenu | Yes | Yes    | Yes   |
| touchstart  | Yes | Yes    | Yes   |
| touchend    | Yes | Yes    | Yes   |
| touchmove   | Yes | Yes    | Yes   |
| touchcancel | Yes | Yes    | Yes   |
|             |     |        |       |

### Usage

### **#.on(eventType, eventHndlr)**

To bind event handlers on the graphical element. Accepts eventType and event handler as an argument. The handler receives the event object as an argument.

```
element.on('click',function(event){ // if no data bound, then only event object.
    this; // this refers to the element context.
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nswamy14.gitbook.io/i2djs-v5/api-reference/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
