Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
more minor fixes and kdoc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Jul 9, 2021
1 parent 6de6eb2 commit 92f9b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/kweb/Element.kt
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ open class Element(
* [class attribute](https://www.w3schools.com/html/html_classes.asp). This will
* be ignored if [onlyIf] is false.
*/
//language=JavaScript
fun removeClasses(vararg classes: String, onlyIf: Boolean = true): Element {
if (onlyIf) {
for (class_ in classes) {
if (class_.contains(' ')) {
error("Class names must not contain spaces")
}
//language=JavaScript
callJsFunction("""
let id = {};
let className = {};
Expand Down

0 comments on commit 92f9b69

Please sign in to comment.