Skip to content

webRequest.ResourceType and declarativeNetRequest.ResourceType for text module imports #986

@eemeli

Description

@eemeli

The HTML and Fetch standards have been updated to add support for text imports, as in:

import text from "./path/to/file.txt" with { type: "text" };

The Fetch standard update includes a new destination "text" for such imports, which is then made available to servers via a Sec-Fetch-Dest: text header.

While reviewing my Firefox implementation for this, @Rob--W identified that the web extension webRequest.ResourceType and declarativeNetRequest.ResourceType also need consideration, and might warrant either adding a new text type there as well, or using other instead. Which one should we go with?

As potentially relevant context, it's likely that the import-bytes proposal will also be advancing in the relevant standards bodies, at least once immutable arraybuffers become available. That'd add { type: "bytes" } import attribute support. I'm not aware of any other new module types being advanced at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportive: chromeSupportive from Chromesupportive: firefoxSupportive from Firefoxsupportive: safariSupportive from Safaritopic: dnrRelated to declarativeNetRequesttopic: webRequestIssues related to observing and modifying network requests using the webRequest API.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions