Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Introduce context.response.hast? #285

@trieloff

Description

@trieloff

In #281 I'm parsing the HTML string from context.response.body, then transform it, then write it back to context.response.body. Great.

For #153 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all a elements, and add their hrefs to the link header to enable pre-fetching.

In #122 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all meta elements, and add some of them to the response headers.

Therefore, I propose the creation of a new parse-response-html step, a context.response.hast property and a new stringif-response-html step for the HTML pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requestedreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions