-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Embedded js: remove more dependency on jquery #9515
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
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.
This looks like a great update to me. I'm 👍 on it, assuming we test that it continues to work. @agjohnson might also have some style feedback, but the small refactors look pretty straightforward.
|
||
const rtddata = require('./rtd-data'); | ||
const xss = require('xss/lib/index'); | ||
const { createDomNode } = require("./utils"); |
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.
Do we need to specify that we're using this function from utils
, or is the compiler smart enough to know what is happening if we add additional utils functions?
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.
The compile step will resolve the functions in utils.js
for use here, yeah. This syntax will only import createDomNode
from utils.js
. If more functions are added to utils.js
, they won't automatically be imported here, but could be with const { createDomNode, someOtherUtil } = ..
This is on top of #9508
📚 Documentation previews 📚
docs
): https://docs--9515.org.readthedocs.build/en/9515/dev
): https://dev--9515.org.readthedocs.build/en/9515/