---
title: attach
description: >-
  Show the annotations stored for `page` beside `content`, the note's body
  element. Returns `detach`, which removes every marker, card, highlight and
  list it added. Comments whose passage is no longer in the note are listed
  after it.
updated_at: '2026-11-19T21:19:47+01:00'
created_at: '2026-11-11T18:31:18+01:00'
symbol:
  kind: function
  name: attach
  signatures:
    - >-
      attach(content: HTMLElement, options:
      [[reference/api/plugin-annotations/browser/AttachOptions|AttachOptions]] |
      [[reference/api/plugin-annotations/browser/HostNoteOptions|HostNoteOptions]]):
      () => void
  parameters:
    - name: content
      type: HTMLElement
    - name: options
      type: >-
        [[reference/api/plugin-annotations/browser/AttachOptions|AttachOptions]]
        |
        [[reference/api/plugin-annotations/browser/HostNoteOptions|HostNoteOptions]]
  returns:
    type: () => void
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/plugin-annotations/src/browser.ts#L315
---

# attach

A host app names the note instead: `attach(element, { vault, slug })`, with `vault` from `virtual:svartz/host`.
