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

prepend next to append #86

Closed
robstoll opened this issue Apr 30, 2018 · 3 comments
Closed

prepend next to append #86

robstoll opened this issue Apr 30, 2018 · 3 comments

Comments

@robstoll
Copy link

would be nice if there is also a prepend function next to append.

@cy6erGn0m
Copy link
Contributor

Are you talking about this https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend ?

@robstoll
Copy link
Author

robstoll commented May 4, 2018

Not exactly but kind of. I currently do this:

val div = document.create.div { ... }
element.insertBefore(div, element.firstChild)

Would be nice if kotlinx.html has a prepend function so that I can write:

element.prepend {
  div { ... } 
}

@cy6erGn0m
Copy link
Contributor

Fixed in 0.6.10

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

No branches or pull requests

2 participants