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

Consider to expose get_active_script_or_module and ActiveRunnable #4129

Open
dtugend opened this issue Jan 13, 2025 · 0 comments
Open

Consider to expose get_active_script_or_module and ActiveRunnable #4129

dtugend opened this issue Jan 13, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dtugend
Copy link

dtugend commented Jan 13, 2025

I can't judge mysef if it's a good idea at this point in time or not, but maybe it's possible to consider to expose get_active_script_or_module on the Context class and the ActiveRunnable enum, since it's currently private to the crate:

pub(crate) fn get_active_script_or_module(&self) -> Option<ActiveRunnable> {

The reason for this is that I'd like to implement a module / script source "load" / exec function that uses the current script's or module's Referrer to be able load files relative to that.

@dtugend dtugend added the enhancement New feature or request label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant