Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

turbolinks:load and async script loading #28

@SqueezedLight

Description

@SqueezedLight

Hi guys,
currently i'm trying to implement async script loading like that:

<%= javascript_include_tag 'application', async: true %>

It seems the turbolinks:load event does not fire on initial page load in this case. Everything works fine when navigating through pages.
I have the following code in my application.js:

document.addEventListener("turbolinks:load", function() {
  console.log("turbolinks:load fired!")
});

What am i missing?

Thanks a lot for your help.

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