8000 Inline - optional from and to parameters · Issue #37 · postlight/trimmings · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inline - optional from and to parameters #37
Open
@garygreen

Description

@garygreen

Presently you have to duplicate where you want to load from and to for the inline feature:

<a
        data-trimmings-inline="from: main, to: main"
        href="/cake"
      >
        Cake
      </a>
... etc
... etc

This can get pretty repetitive if you serve just a partial from the server of the exact element to be replaced.

So it would be great if the from and to were both optional and infered based on the top-root element in response from the server.

For example:

<a
        data-trimmings-inline
        href="/cake"
      >
        Cake
      </a>

Response from server:

<main>.....</main>

Trimmings will assume from: main, to: main

Another example:

<a
        data-trimmings-inline="to: custom-main"
        href="/cake"
      >
        Cake
      </a>

Assuming the same response from the server <main> trimmings will essentially assume:

from: main, to: custom-main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0