-
Notifications
You must be signed in to change notification settings - Fork 28
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
remove <script> from page_table.inc #1299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Can you spin up a sandbox on TEST too please?
Sandbox updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR didn't update this call to echo_page_table
that would need to include the new JS file, no?
I am slightly concerned about the hidden assumption that calling echo_page_table
now requires to import the script in the caller or else the selection will not work. It would probably be better to have it output a <script defer src="...">
inside echo_page_table
but I could be missing something.
I'm not sure if I have understood your concern correctly but do_page_table() is only called in project.php so the js file will be loaded in the page head by output_html_header() in html_page_common.inc. |
Sandbox updated. |
First, sorry if my previous comment was unclear. Also I am still fairly new to DP development so feel free to point out if this doesn't make sense.
The concern is that the code prior to this PR would automatically register an |
Your comment makes sense to me and this two-step process does introduce the possibility of an error. I think in this case its worth it, as having the JS file included as part of our header code allows the introduction of a nonce for these in one place rather than spread around the code. What would probably be ideal is for an |
contribution to issue #1298
Sandbox at: https://www.pgdp.org/~rp31/c.branch/unscript_project