# MapHostElement

The part of an HTML element the map adapters need. A structural subset of
`HTMLElement`, so this port names no DOM type.

This is an interface exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import type { MapHostElement } from "@mapcairn/core";
 
interface MapHostElement
```

## Methods

### focus

```ts
focus(options?: {
        preventScroll?: boolean;
    }): void;
```

Moves keyboard focus to the element. `preventScroll` keeps the page from scrolling to it.

- `options?` (`{
        preventScroll?: boolean;
    }`)

### getBoundingClientRect

```ts
getBoundingClientRect(): {
        readonly width: number;
        readonly height: number;
        readonly left: number;
        readonly top: number;
    };
```

The element's size and position in CSS pixels, as the browser reports them.

Source: [packages/core/src/ports/map.ts:13](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/ports/map.ts#L13)
