Example for replacing javascript with Jaspr/dart #415
Unanswered
neoacevedo
asked this question in
Q&A
Replies: 1 comment
-
|
With Jaspr you don't manipulate dom elements directly. Instead, build your elements declaratively: yield div(
id: 'my-id',
events: {'click': (e) {
e.preventDefault();
print('Whatever');
}},
[
text('Click me'),
],
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What I want to mean is about to replace JS code with Jaspr/dart code. For instance, in JS:
What should be the equivalent for Jaspr/dart?
Beta Was this translation helpful? Give feedback.
All reactions