Skip to content

Provide some source information for scripts without source information #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
noamr opened this issue Mar 27, 2024 · 3 comments
Open

Comments

@noamr
Copy link
Collaborator

noamr commented Mar 27, 2024

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.

@noamr
Copy link
Collaborator Author

noamr commented Apr 4, 2024

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...

@tunetheweb tunetheweb changed the title Provide some source information for inline scripts Provide some source information for scripts without source information May 17, 2024
@proofyman
Copy link

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.

@andydavies
Copy link

andydavies commented Dec 10, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants