Skip to content

Provide lazily loaded Java values within the JavaScript context #1351

Answered by p-bakker
erstr2ggl asked this question in Q&A
Discussion options

You must be logged in to vote

In plain JavaScript if one wants to lazyload an object only when it's accessed, one would define a property with a get method on it that would 'fetch' the object and return it only when the property is accessed (See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get for example)

I think you can do the same in Rhino in various ways

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by p-bakker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants