WICG / WICG/declarative-partial-updates

How to resolve relative paths

Open
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
135
Forks
13
Avg merge
12m
Merged PRs (30d)
3

Description

In streamed DOM, there could be relative URLs, how to resolve them?

It seems there should be a way to ensure that the relative paths refer to the resources relative to the DOM streamed view location instead of being relative to the page that embeds it.

Use case : I want to stream/include a component that reference an image. The component references the image as a relative path to the component HTML markup.

Back in the days of XML, there was a xml:base attribute that could alter the base path used to compute relative URLs on the XML subtree. In HTML, there is only a tag in the HEAD for that unfortunately.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the streamed DOM use case and the comparison with XML's xml:base, then investigate how HTML resolves relative URLs when embedded or streamed. Done means proposing a settled way for component-relative resources to resolve correctly, with the relevant behavior and scope documented.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.