Initial Commit

This commit is contained in:
2025-09-23 20:22:59 -04:00
commit 743fc51873
135 changed files with 12240 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
//
// Map.swift
// HTMLStandard
//
// Generated on 09/23/2025.
// THIS FILE IS GENERATED. DO NOT EDIT.
//
import Foundation
/// <map> Image map
public class Map : HTMLNode, IFlow, IPalpable, IPhrasing {
/// Name of image map to reference from the usemap attribute. Text. The actual rules are more complicated than indicated.
public var name:String? = nil
public init(_ attributes:[String:String], _ parser:XMLParser? = nil) throws {
var globalAttr = GlobalAttributesBuilder()
for (key, attValue) in attributes {
switch (key) {
case "name":
name = attValue
continue
default: break
}
if globalAttr.trySetGlobalAttribute(key, attValue) {
continue
}
throw AppError("Unexpected attribute: \(key)")
}
var allItems:[HTMLNode] = []
while let obj = try parser?.readObject(endTag: "map", xmlToHtmlMapper) {
allItems.append(obj)
}
super.init(globalAttr, allItems)
}
public override func renderAttributes() -> String {
var result = super.renderAttributes()
if let name = name {
result += " name='\(name)'"
}
return result
}
override var nodeName: String {
return "map"
}
override var isVoidElement: Bool {
return false
}
}