Skip to content

Provide some source information for scripts without source information #11

Open

Description

@noamr

This includes <script>...</script> and <button onclick="...">. Those inline scripts currently show an empty sourceURL and character position, would be good to figure out how to represent them better.

Activity

  1. noamr commented on Apr 4, 2024

    @noamr
    CollaboratorAuthor

    Actually testing this I see that we do get source information for those, what we don't get is source information for e.g. setTimeout("string"), not sure what the source information for that should be...

  2. changed the title [-]Provide some source information for inline scripts[/-] [+]Provide some source information for scripts without source information[/+] on May 17, 2024
  3. proofyman commented on Jul 23, 2024

    @proofyman

    Would be great to log id / data-attribute / something else for inline scripts. We have a lot of inline script inside our page, and loaf entries for them are useless.

  4. andydavies commented on Dec 10, 2024

    @andydavies
    Contributor

    This is achievable today using //# sourceURL=foo

    See this page for an example https://andydavies.github.io/agent-tests/loaf/sourceurl.html

    Not sure how workable the solution is but it's what sourceURL was designed for.

    Other challenge will be getting sourceURL added to injected snippets and there might be some other draw backs I'm not aware of too

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