Moved BindingGenerator from gen html project. It makes more sense here.
This commit is contained in:
196
Sources/BindingGenerator/Generated/Elements/Body.swift
Normal file
196
Sources/BindingGenerator/Generated/Elements/Body.swift
Normal file
@@ -0,0 +1,196 @@
|
||||
//
|
||||
// Body.swift
|
||||
// HTMLStandard
|
||||
//
|
||||
// Generated on 09/23/2025.
|
||||
// THIS FILE IS GENERATED. DO NOT EDIT.
|
||||
//
|
||||
import Foundation
|
||||
|
||||
/// <body> Document body
|
||||
public class Body : HTMLNode, ISectioningRoot {
|
||||
|
||||
/// event handler.
|
||||
public var onafterprint:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onbeforeprint:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onbeforeunload:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onhashchange:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onlanguagechange:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onmessage:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onmessageerror:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onoffline:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var ononline:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onpagehide:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onpageshow:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onpopstate:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onrejectionhandled:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onstorage:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onunhandledrejection:String? = nil
|
||||
|
||||
/// event handler.
|
||||
public var onunload:String? = nil
|
||||
|
||||
|
||||
public init(_ attributes:[String:String], _ parser:XMLParser? = nil) throws {
|
||||
var globalAttr = GlobalAttributesBuilder()
|
||||
for (key, attValue) in attributes {
|
||||
switch (key) {
|
||||
case "onafterprint":
|
||||
onafterprint = attValue
|
||||
continue
|
||||
case "onbeforeprint":
|
||||
onbeforeprint = attValue
|
||||
continue
|
||||
case "onbeforeunload":
|
||||
onbeforeunload = attValue
|
||||
continue
|
||||
case "onhashchange":
|
||||
onhashchange = attValue
|
||||
continue
|
||||
case "onlanguagechange":
|
||||
onlanguagechange = attValue
|
||||
continue
|
||||
case "onmessage":
|
||||
onmessage = attValue
|
||||
continue
|
||||
case "onmessageerror":
|
||||
onmessageerror = attValue
|
||||
continue
|
||||
case "onoffline":
|
||||
onoffline = attValue
|
||||
continue
|
||||
case "ononline":
|
||||
ononline = attValue
|
||||
continue
|
||||
case "onpagehide":
|
||||
onpagehide = attValue
|
||||
continue
|
||||
case "onpageshow":
|
||||
onpageshow = attValue
|
||||
continue
|
||||
case "onpopstate":
|
||||
onpopstate = attValue
|
||||
continue
|
||||
case "onrejectionhandled":
|
||||
onrejectionhandled = attValue
|
||||
continue
|
||||
case "onstorage":
|
||||
onstorage = attValue
|
||||
continue
|
||||
case "onunhandledrejection":
|
||||
onunhandledrejection = attValue
|
||||
continue
|
||||
case "onunload":
|
||||
onunload = attValue
|
||||
continue
|
||||
|
||||
default: break
|
||||
}
|
||||
if globalAttr.trySetGlobalAttribute(key, attValue) {
|
||||
continue
|
||||
}
|
||||
continue
|
||||
}
|
||||
var allItems:[HTMLNode] = []
|
||||
while let obj = try parser?.readObject(endTag: "body", xmlToHtmlMapper) {
|
||||
allItems.append(obj)
|
||||
}
|
||||
super.init(globalAttr, allItems)
|
||||
}
|
||||
|
||||
|
||||
public func addChild(_ someElement:IFlow) {
|
||||
children.append(someElement)
|
||||
}
|
||||
|
||||
public override func renderAttributes() -> String {
|
||||
var result = super.renderAttributes()
|
||||
if let onafterprint = onafterprint {
|
||||
result += " onafterprint='\(onafterprint)'"
|
||||
}
|
||||
if let onbeforeprint = onbeforeprint {
|
||||
result += " onbeforeprint='\(onbeforeprint)'"
|
||||
}
|
||||
if let onbeforeunload = onbeforeunload {
|
||||
result += " onbeforeunload='\(onbeforeunload)'"
|
||||
}
|
||||
if let onhashchange = onhashchange {
|
||||
result += " onhashchange='\(onhashchange)'"
|
||||
}
|
||||
if let onlanguagechange = onlanguagechange {
|
||||
result += " onlanguagechange='\(onlanguagechange)'"
|
||||
}
|
||||
if let onmessage = onmessage {
|
||||
result += " onmessage='\(onmessage)'"
|
||||
}
|
||||
if let onmessageerror = onmessageerror {
|
||||
result += " onmessageerror='\(onmessageerror)'"
|
||||
}
|
||||
if let onoffline = onoffline {
|
||||
result += " onoffline='\(onoffline)'"
|
||||
}
|
||||
if let ononline = ononline {
|
||||
result += " ononline='\(ononline)'"
|
||||
}
|
||||
if let onpagehide = onpagehide {
|
||||
result += " onpagehide='\(onpagehide)'"
|
||||
}
|
||||
if let onpageshow = onpageshow {
|
||||
result += " onpageshow='\(onpageshow)'"
|
||||
}
|
||||
if let onpopstate = onpopstate {
|
||||
result += " onpopstate='\(onpopstate)'"
|
||||
}
|
||||
if let onrejectionhandled = onrejectionhandled {
|
||||
result += " onrejectionhandled='\(onrejectionhandled)'"
|
||||
}
|
||||
if let onstorage = onstorage {
|
||||
result += " onstorage='\(onstorage)'"
|
||||
}
|
||||
if let onunhandledrejection = onunhandledrejection {
|
||||
result += " onunhandledrejection='\(onunhandledrejection)'"
|
||||
}
|
||||
if let onunload = onunload {
|
||||
result += " onunload='\(onunload)'"
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
override var nodeName: String {
|
||||
return "body"
|
||||
}
|
||||
|
||||
override var isVoidElement: Bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user