Skip to content

Documentation setContext and getContext cleanup #2638

@bwbroersma

Description

@bwbroersma

Shouldn't we use the <svelte:head> in the setContext and getContext example? I'm against introducing new concepts too early for no reason, but the current code is a bit of a mess now.

Propose using:

<svelte:head>
	<link rel="stylesheet" href="https://unpkg.com/mapbox-gl/dist/mapbox-gl.css">
</svelte:head>

Instead of the current:

const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://unpkg.com/mapbox-gl/dist/mapbox-gl.css';
link.onload = () => {

link.parentNode.removeChild(link);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions