Skip to content

[htmx4] Swap style for boosted elements is not outerSync #4138

Open

Description

@xhaggi

Unlike what is mentioned in the documentation, the swap style for boosted elements is not outerSync.

https://four.htmx.org/reference/attributes/hx-boost

Reproduction

This test will fail with AssertionError: expected 'innerHTML' to equal 'outerSync'.

it('Swap style for boosted elements should be outerSync', async function () {
    mockResponse('GET', '/test', 'Response')
    let div = createProcessedHTML('<a href="/test" hx-boost="true"></a>')
    let swap = ''
    div.addEventListener('htmx:before:swap', (evt) => swap = evt.detail.ctx.swap)
    div.click()
    await forRequest()
    assert.equal(swap, 'outerSync')
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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