I am not 100% clear on what you are asking. In particular, I am not sure if you are looking for a way to access the definition, or the value at runtime.
Assuming the runtime value:
Browser.Dom.getViewport returns a
Tasks do not do anything by themselves, but need to be “started”.
Depending on whether the task can fail or not, you can use either
Task.perform. They take a callback message, so that they can notify your update when they are done.
The parts of the documentation might be of more help than my explanation:
So, to access the value at runtime, you must kick off the Task, and read the value that it gives back.
The viewport value will exist under
.viewport, of the name that you assign it to. You can start the task either as the result of user interaction, or even in the second argument to the
Here’s a quick example that shows this:
(Sorry if I misunderstood your question, happy to follow up )