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

Add event support #4

Open
Tlaster opened this issue Sep 17, 2018 · 1 comment
Open

Add event support #4

Tlaster opened this issue Sep 17, 2018 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@Tlaster
Copy link
Member

Tlaster commented Sep 17, 2018

Fire a native function

button {
    onclick = HandleClick
}

code behind (C#):

void HandleClick(object sender, object dataContext) {
    //handle the click event
}

List sample:

list {
    ...
    itemClick = HandleItemClick
}

code behind (C#):
(not sure if we should add the index as parameter)

void HandleItemClick(object sender, object dataContext) {
    //handle the item click event
}
@Tlaster Tlaster added the enhancement New feature or request label Sep 17, 2018
@Tlaster Tlaster added this to the 0.2 milestone Sep 17, 2018
@Tlaster
Copy link
Member Author

Tlaster commented Nov 19, 2018

First, we can add script support for the event like

button {
    click = ${
        it.Count++
    }
}

Tlaster added a commit that referenced this issue Dec 23, 2018
Add promise conversion && http object
Tlaster added a commit that referenced this issue Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant