# Struct `kurogane::ContextMenuTarget`

```rust
pub struct ContextMenuTarget { /* private fields */ }
```

What a right-click was on.

## Methods

### `origin`

```rust
pub fn origin(&self) -> &Origin
```

Returns the origin of the document right-clicked (the page's or a
frame's inside it). A sandboxed document's origin is opaque here
whatever its URL.

### `page_url`

```rust
pub fn page_url(&self) -> &str
```

The URL of the page the browser shows.

### `frame_url`

```rust
pub fn frame_url(&self) -> &str
```

The URL of the document right-clicked, the page's or a frame's.

### `link_url`

```rust
pub fn link_url(&self) -> Option<&str>
```

The URL of the link right-clicked.

### `media`

```rust
pub fn media(&self) -> Option<MediaKind>
```

Returns the kind of media right-clicked (for example an image or a
video).

### `media_url`

```rust
pub fn media_url(&self) -> Option<&str>
```

The URL of the media right-clicked, when it has one.

### `selection`

```rust
pub fn selection(&self) -> Option<&str>
```

The text selected where the right-click was.

### `is_editable`

```rust
pub fn is_editable(&self) -> bool
```

Whether the right-click was in a text field or other editable
content.

### `misspelled_word`

```rust
pub fn misspelled_word(&self) -> Option<&str>
```

The misspelled word right-clicked.

### `position`

```rust
pub fn position(&self) -> (i32, i32)
```

Where the right-click was, in the browser's view.

### `browser`

```rust
pub fn browser(&self) -> Option<BrowserId>
```

The browser right-clicked.

## Trait implementations

- `impl Clone for ContextMenuTarget`
- `impl Debug for ContextMenuTarget`

Source: https://github.com/0x48piraj/kurogane/blob/584c586118ee53cc04604007ee038557bd859092/kurogane/src/context_menu.rs#L245
