The load function has parameters that it can take in which are automatically populated by sveltekit:

  • url - an instance of URL which contains properties like orign, hostname, pathname, searchParams
  • route - contains the name of the current route directory relative to src/routes
  • params - derived from url.pathname and route.id