Skip to content
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

"Go to Definition" from an HTML page doesn't seem to work with inline event handlers. #154525

Closed
sanfordstaab opened this issue Jul 8, 2022 · 3 comments
Assignees

Comments

@sanfordstaab
Copy link

Here's a sample HTML line:
<select id="sel-harvest-parts" onchange="editMonths();"></select>

editMonths() is defined in a .js file that is referenced by the HTML file with this line:

<script type="text/javascript" src="dataEntry.harvest.js"></script>

and it works fine in Chrome but the editor cannot locate the definition.

Doing the same thing from a .js file reference works fine.

Hey, thanks for a really great editor!!! You rock.

@sanfordstaab
Copy link
Author

I have found this also fails to find references to js functions from HTML inline event handler calls.

@sanfordstaab sanfordstaab changed the title "Go to Definition" from an HTML page doesn't seem to work "Go to Definition" from an HTML page doesn't seem to work with inline event handlers. Jul 8, 2022
@aeschli
Copy link
Contributor

aeschli commented Jul 11, 2022

The HTML language support only knows about the functions in the same file. We don't follow references across files.

Feature request to use imports is #114115

@aeschli aeschli closed this as completed Jul 11, 2022
@sanfordstaab
Copy link
Author

sanfordstaab commented Jul 11, 2022 via email

@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants