Skip to content

Commit 1a1b6bb

Browse files
authored
Deprecate parameter element (#176)
* Mark the parameter element as deprecated * Remove the test of the deprecated element
1 parent 66312d8 commit 1a1b6bb

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

Sources/HTMLKit/Abstraction/Elements/ObjectElements.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public struct Parameter: EmptyNode, ObjectElement {
2929

3030
internal var attributes: OrderedDictionary<String, Any>?
3131

32+
@available(*, deprecated, message: "The parameter element is no longer part of the web standards. Use the data attribute of the object element instead.")
3233
public init() {}
3334

35+
@available(*, deprecated, message: "The parameter element is no longer part of the web standards. Use the data attribute of the object element instead.")
3436
internal init(attributes: OrderedDictionary<String, Any>?) {
3537
self.attributes = attributes
3638
}

Tests/HTMLKitTests/ElementTests.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,21 +1072,6 @@ final class ElementTests: XCTestCase {
10721072
)
10731073
}
10741074

1075-
func testParameterElement() throws {
1076-
1077-
let view = TestView {
1078-
Parameter()
1079-
Param()
1080-
}
1081-
1082-
XCTAssertEqual(try renderer.render(view: view),
1083-
"""
1084-
<param>\
1085-
<param>
1086-
"""
1087-
)
1088-
}
1089-
10901075
func testVideoElement() throws {
10911076

10921077
let view = TestView {

0 commit comments

Comments
 (0)