Moved BindingGenerator from gen html project. It makes more sense here.
This commit is contained in:
64
Sources/BindingGenerator/Generated/Elements/Style.swift
Normal file
64
Sources/BindingGenerator/Generated/Elements/Style.swift
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// Style.swift
|
||||
// HTMLStandard
|
||||
//
|
||||
// Generated on 09/23/2025.
|
||||
// THIS FILE IS GENERATED. DO NOT EDIT.
|
||||
//
|
||||
import Foundation
|
||||
|
||||
/// <style> Embedded styling information
|
||||
public class Style : HTMLNode, IMetaData {
|
||||
|
||||
/// Applicable media. Valid media query list.
|
||||
public var media:String? = nil
|
||||
|
||||
|
||||
/// CSS style sheet set name.
|
||||
public var title:String? {
|
||||
get { return globalAttributes[.title] }
|
||||
set { globalAttributes[.title] = newValue }
|
||||
}
|
||||
|
||||
|
||||
public init(_ attributes:[String:String], _ parser:XMLParser? = nil) throws {
|
||||
var globalAttr = GlobalAttributesBuilder()
|
||||
for (key, attValue) in attributes {
|
||||
switch (key) {
|
||||
case "media":
|
||||
media = attValue
|
||||
continue
|
||||
|
||||
default: break
|
||||
}
|
||||
if globalAttr.trySetGlobalAttribute(key, attValue) {
|
||||
continue
|
||||
}
|
||||
continue
|
||||
}
|
||||
var allItems:[HTMLNode] = []
|
||||
while let obj = try parser?.readObject(endTag: "style", xmlToHtmlMapper) {
|
||||
allItems.append(obj)
|
||||
}
|
||||
super.init(globalAttr, allItems)
|
||||
}
|
||||
|
||||
|
||||
public override func renderAttributes() -> String {
|
||||
var result = super.renderAttributes()
|
||||
if let media = media {
|
||||
result += " media='\(media)'"
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
override var nodeName: String {
|
||||
return "style"
|
||||
}
|
||||
|
||||
override var isVoidElement: Bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user