Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove uses of opts::get() from components/script #23639
Labels
Comments
|
for the one in script_runtime.rs, we may be able to thread an argument through several function calls until we reach a function that does have access to GlobalScope. (unless I'm misunderstanding what you're saying?) However... that seems kinda ugly, and I'm not sure how much of an option that is for conversions.rs. It'd be easier to apply the pattern used in #24500, but easier may not be better in this case, especially since we're not dealing with global/static functions that have to have no arguments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are two non-trivial uses of
opts::get()in components/script;script_runtime.rsanddom/bindings/conversions.rs, respectively.These are non-trivial because there is no direct way of passing them via Window or GlobalScope. We should refactor to be able to pass those arguments without using global
opts::get().Related to #22854.