Skip to content

Highway not working with DOM elements rendered by javascript #117

@Rinmawia

Description

@Rinmawia

So, I have a list of cards that is rendered using Javascript, and every cards has it's link, Highway doesn't seem to work on these elements. Is there anyway to fix this?

cardContainer.innerHTML += `
                    <a class="card" href="/${card.url}" draggable="false">
                        <h1 class="title"><span>${card.title}</span></h1>
                        <p class="description"><span>${card.description}</span></p>
                        <video class="card-video" muted loop>
                          <source src="${card.image}" type="video/webm">
                        </video>
                    </a>
                `;

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