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

Variables in Custom JS Funtion Variable #528

Open
wants to merge 2 commits into
base: 4.x-dev
Choose a base branch
from

Conversation

ulcuber
Copy link
Contributor

@ulcuber ulcuber commented Aug 1, 2022

Description:

Resolves #212

Review

@AltamashShaikh
Copy link
Contributor

@ulcuber Does this code works for you ?

function () { if ({{ClickElement}}) { return {{ClickElement}}.getAttribute('class'); } else { return "111"; } };

@ulcuber
Copy link
Contributor Author

ulcuber commented Aug 4, 2022

@AltamashShaikh checked this issue. It was just creating variable. I forgot to evaluate variable. Now it works

Copy link
Contributor

@AltamashShaikh AltamashShaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ulcuber Changes looks good
@tsteur Can you also please review it once ?

@tsteur
Copy link
Member

tsteur commented Aug 7, 2022

@AltamashShaikh @ulcuber the reason I didn't implement it I believe was because I couldn't figure out how to make this work without using eval. I believe in some cases this wouldn't work maybe like below?

var {{ foo }} = {{ bar }};

Not sure if such cases would work? Or if the variables would only work in few specific places?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support variables in Custom JavaScript variable
4 participants