diff --git a/Sources/TokamakDOM/App/App.swift b/Sources/TokamakDOM/App/App.swift index 27c07b43e..3b5266d2e 100644 --- a/Sources/TokamakDOM/App/App.swift +++ b/Sources/TokamakDOM/App/App.swift @@ -21,6 +21,9 @@ import TokamakCore import TokamakStaticHTML extension App { + public static func _launch(_ app: Self, _ rootEnvironment: EnvironmentValues) { + _launch(app, rootEnvironment, TokamakDOM.body) + } /// The default implementation of `launch` for a `TokamakDOM` app. /// /// Creates a host `div` node and appends it to the body. @@ -28,8 +31,7 @@ extension App { /// The body is styled with `margin: 0;` to match the `SwiftUI` layout /// system as closely as possible /// - public static func _launch(_ app: Self, _ rootEnvironment: EnvironmentValues) { - let body = TokamakDOM.body + public static func _launch(_ app: Self, _ rootEnvironment: EnvironmentValues, _ body: JSObjectRef) { if body.style.object!.all == "" { body.style = "margin: 0;" }