---
title: BrowserScriptContext
description: >-
  Where the site is served, for scripts that build URLs, such as a server
  plugin's `<base>/_svartz/<id>/`.
updated_at: '2026-11-12T12:04:45+01:00'
created_at: '2026-09-24T10:00:33+02:00'
symbol:
  kind: interface
  name: BrowserScriptContext
  signatures:
    - interface BrowserScriptContext
  members:
    - name: base
      kind: property
      signature: 'readonly base: string'
      description: >-
        SvelteKit's deployment base path (`paths.base`), without a trailing
        slash; `""` at the domain root.
    - name: note
      kind: property
      signature: 'readonly note?: HTMLElement'
      description: >-
        The note body this mount is for, when a host page renders the note with
        `SvartzNoteContent`: it carries `data-svartz-note` when the note is
        public. A host page can show several, each mounting the scripts with its
        own. Absent on theme pages, where the document holds one page; look up
        `[data-svartz-note]` there.
    - name: mountContent
      kind: method
      signature: >-
        readonly mountContent?(target: HTMLElement):
        Promise<[[reference/api/core/ContentView|ContentView]]>
      description: >-
        Show inert HTML in `target` as this page shows a note body: through the
        theme's content components (the host's overrides first), sanitized as
        the build sanitizes. The renderer loads on first use. Absent when the
        page renders no vault content.
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/core/src/plugin/browser-scripts.ts#L2
---

# BrowserScriptContext
