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 introducing per-Element script execution. #1776

Open
ioquatix opened this issue Dec 3, 2023 · 0 comments
Open

Consider introducing per-Element script execution. #1776

ioquatix opened this issue Dec 3, 2023 · 0 comments

Comments

@ioquatix
Copy link

ioquatix commented Dec 3, 2023

13.2 Executing Script

It would be nice if we could have the identical document level script execution, per element, such that this would be set to the element in question.

I emulated this, but I think it's such a useful feature it should be a first class operation.

class Element
  # ...
  def execute(script, *arguments)
    @session.execute("return (function(){#{script}}).call(...arguments)", self, *arguments)
  end

  def execute_async(script, *arguments)
    @session.execute_async("return (function(){#{script}}).call(...arguments)", self, *arguments)
  end
  # ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant