@@ -3640,6 +3640,11 @@ public class DOMRectList: JSBridgedClass {
3640
3640
@inlinable public subscript(key: Int) -> DOMRect? {
3641
3641
jsObject[key].fromJSValue()
3642
3642
}
3643
+
3644
+ @inlinable public func item(index: UInt32) -> DOMRect? {
3645
+ let this = jsObject
3646
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
3647
+ }
3643
3648
}
3644
3649
3645
3650
public class DOMRectReadOnly: JSBridgedClass {
@@ -3715,6 +3720,11 @@ public class DOMStringList: JSBridgedClass {
3715
3720
jsObject[key].fromJSValue()
3716
3721
}
3717
3722
3723
+ @inlinable public func item(index: UInt32) -> String? {
3724
+ let this = jsObject
3725
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
3726
+ }
3727
+
3718
3728
@inlinable public func contains(string: String) -> Bool {
3719
3729
let this = jsObject
3720
3730
return this[Strings.contains].function!(this: this, arguments: [_toJSValue(string)]).fromJSValue()!
@@ -3731,11 +3741,14 @@ public class DOMStringMap: JSBridgedClass {
3731
3741
}
3732
3742
3733
3743
@inlinable public subscript(key: String) -> String {
3734
- jsObject[key].fromJSValue()!
3744
+ get {
3745
+ jsObject[key].fromJSValue()!
3746
+ }
3747
+ set {
3748
+ jsObject[key] = _toJSValue(newValue)
3749
+ }
3735
3750
}
3736
3751
3737
- // XXX: unsupported setter for keys of type String
3738
-
3739
3752
// XXX: unsupported deleter for keys of type String
3740
3753
}
3741
3754
@@ -3757,6 +3770,11 @@ public class DOMTokenList: JSBridgedClass, Sequence {
3757
3770
jsObject[key].fromJSValue()
3758
3771
}
3759
3772
3773
+ @inlinable public func item(index: UInt32) -> String? {
3774
+ let this = jsObject
3775
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
3776
+ }
3777
+
3760
3778
@inlinable public func contains(token: String) -> Bool {
3761
3779
let this = jsObject
3762
3780
return this[Strings.contains].function!(this: this, arguments: [_toJSValue(token)]).fromJSValue()!
@@ -5535,6 +5553,11 @@ public class FileList: JSBridgedClass {
5535
5553
jsObject[key].fromJSValue()
5536
5554
}
5537
5555
5556
+ @inlinable public func item(index: UInt32) -> File? {
5557
+ let this = jsObject
5558
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
5559
+ }
5560
+
5538
5561
@ReadonlyAttribute
5539
5562
public var length: UInt32
5540
5563
}
@@ -6223,6 +6246,11 @@ public class HTMLAllCollection: JSBridgedClass {
6223
6246
jsObject[key].fromJSValue()
6224
6247
}
6225
6248
6249
+ @inlinable public func namedItem(name: String) -> Element_or_HTMLCollection? {
6250
+ let this = jsObject
6251
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
6252
+ }
6253
+
6226
6254
@inlinable public func item(nameOrIndex: String? = nil) -> Element_or_HTMLCollection? {
6227
6255
let this = jsObject
6228
6256
return this[Strings.item].function!(this: this, arguments: [_toJSValue(nameOrIndex)]).fromJSValue()!
@@ -6570,9 +6598,19 @@ public class HTMLCollection: JSBridgedClass {
6570
6598
jsObject[key].fromJSValue()
6571
6599
}
6572
6600
6601
+ @inlinable public func item(index: UInt32) -> Element? {
6602
+ let this = jsObject
6603
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
6604
+ }
6605
+
6573
6606
@inlinable public subscript(key: String) -> Element? {
6574
6607
jsObject[key].fromJSValue()
6575
6608
}
6609
+
6610
+ @inlinable public func namedItem(name: String) -> Element? {
6611
+ let this = jsObject
6612
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
6613
+ }
6576
6614
}
6577
6615
6578
6616
public class HTMLDListElement: HTMLElement {
@@ -6934,6 +6972,11 @@ public class HTMLFormControlsCollection: HTMLCollection {
6934
6972
@inlinable public subscript(key: String) -> Element_or_RadioNodeList? {
6935
6973
jsObject[key].fromJSValue()
6936
6974
}
6975
+
6976
+ @inlinable override public func namedItem(name: String) -> Element_or_RadioNodeList? {
6977
+ let this = jsObject
6978
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
6979
+ }
6937
6980
}
6938
6981
6939
6982
public class HTMLFormElement: HTMLElement {
@@ -8440,7 +8483,14 @@ public class HTMLOptionsCollection: HTMLCollection {
8440
8483
set { _length.wrappedValue = newValue }
8441
8484
}
8442
8485
8443
- // XXX: unsupported setter for keys of type UInt32
8486
+ @inlinable override public subscript(key: Int) -> HTMLOptionElement? {
8487
+ get {
8488
+ super[key] as? HTMLOptionElement
8489
+ }
8490
+ set {
8491
+ jsObject[key] = _toJSValue(newValue)
8492
+ }
8493
+ }
8444
8494
8445
8495
@inlinable public func add(element: HTMLOptGroupElement_or_HTMLOptionElement, before: HTMLElement_or_Int32? = nil) {
8446
8496
let this = jsObject
@@ -8796,8 +8846,9 @@ public class HTMLSelectElement: HTMLElement {
8796
8846
@ReadWriteAttribute
8797
8847
public var length: UInt32
8798
8848
8799
- @inlinable public subscript(key: Int) -> HTMLOptionElement? {
8800
- jsObject[key].fromJSValue()
8849
+ @inlinable public func item(index: UInt32) -> HTMLOptionElement? {
8850
+ let this = jsObject
8851
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
8801
8852
}
8802
8853
8803
8854
@inlinable public func namedItem(name: String) -> HTMLOptionElement? {
@@ -8820,7 +8871,14 @@ public class HTMLSelectElement: HTMLElement {
8820
8871
_ = this[Strings.remove].function!(this: this, arguments: [_toJSValue(index)])
8821
8872
}
8822
8873
8823
- // XXX: unsupported setter for keys of type UInt32
8874
+ @inlinable public subscript(key: Int) -> HTMLOptionElement? {
8875
+ get {
8876
+ jsObject[key].fromJSValue()
8877
+ }
8878
+ set {
8879
+ jsObject[key] = _toJSValue(newValue)
8880
+ }
8881
+ }
8824
8882
8825
8883
@ReadonlyAttribute
8826
8884
public var selectedOptions: HTMLCollection
@@ -11619,9 +11677,19 @@ public class MimeTypeArray: JSBridgedClass {
11619
11677
jsObject[key].fromJSValue()
11620
11678
}
11621
11679
11680
+ @inlinable public func item(index: UInt32) -> MimeType? {
11681
+ let this = jsObject
11682
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
11683
+ }
11684
+
11622
11685
@inlinable public subscript(key: String) -> MimeType? {
11623
11686
jsObject[key].fromJSValue()
11624
11687
}
11688
+
11689
+ @inlinable public func namedItem(name: String) -> MimeType? {
11690
+ let this = jsObject
11691
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
11692
+ }
11625
11693
}
11626
11694
11627
11695
public class MouseEvent: UIEvent {
@@ -11953,10 +12021,20 @@ public class NamedNodeMap: JSBridgedClass {
11953
12021
jsObject[key].fromJSValue()
11954
12022
}
11955
12023
12024
+ @inlinable public func item(index: UInt32) -> Attr? {
12025
+ let this = jsObject
12026
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
12027
+ }
12028
+
11956
12029
@inlinable public subscript(key: String) -> Attr? {
11957
12030
jsObject[key].fromJSValue()
11958
12031
}
11959
12032
12033
+ @inlinable public func getNamedItem(qualifiedName: String) -> Attr? {
12034
+ let this = jsObject
12035
+ return this[Strings.getNamedItem].function!(this: this, arguments: [_toJSValue(qualifiedName)]).fromJSValue()!
12036
+ }
12037
+
11960
12038
@inlinable public func getNamedItemNS(namespace: String?, localName: String) -> Attr? {
11961
12039
let this = jsObject
11962
12040
return this[Strings.getNamedItemNS].function!(this: this, arguments: [_toJSValue(namespace), _toJSValue(localName)]).fromJSValue()!
@@ -12394,6 +12472,11 @@ public class NodeList: JSBridgedClass, Sequence {
12394
12472
jsObject[key].fromJSValue()
12395
12473
}
12396
12474
12475
+ @inlinable public func item(index: UInt32) -> Node? {
12476
+ let this = jsObject
12477
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
12478
+ }
12479
+
12397
12480
@ReadonlyAttribute
12398
12481
public var length: UInt32
12399
12482
@@ -12659,9 +12742,19 @@ public class Plugin: JSBridgedClass {
12659
12742
jsObject[key].fromJSValue()
12660
12743
}
12661
12744
12745
+ @inlinable public func item(index: UInt32) -> MimeType? {
12746
+ let this = jsObject
12747
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
12748
+ }
12749
+
12662
12750
@inlinable public subscript(key: String) -> MimeType? {
12663
12751
jsObject[key].fromJSValue()
12664
12752
}
12753
+
12754
+ @inlinable public func namedItem(name: String) -> MimeType? {
12755
+ let this = jsObject
12756
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
12757
+ }
12665
12758
}
12666
12759
12667
12760
public class PluginArray: JSBridgedClass {
@@ -12686,9 +12779,19 @@ public class PluginArray: JSBridgedClass {
12686
12779
jsObject[key].fromJSValue()
12687
12780
}
12688
12781
12782
+ @inlinable public func item(index: UInt32) -> Plugin? {
12783
+ let this = jsObject
12784
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
12785
+ }
12786
+
12689
12787
@inlinable public subscript(key: String) -> Plugin? {
12690
12788
jsObject[key].fromJSValue()
12691
12789
}
12790
+
12791
+ @inlinable public func namedItem(name: String) -> Plugin? {
12792
+ let this = jsObject
12793
+ return this[Strings.namedItem].function!(this: this, arguments: [_toJSValue(name)]).fromJSValue()!
12794
+ }
12692
12795
}
12693
12796
12694
12797
public class PopStateEvent: Event {
@@ -14540,11 +14643,19 @@ public class Storage: JSBridgedClass {
14540
14643
return this[Strings.key].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
14541
14644
}
14542
14645
14543
- @inlinable public subscript(key: String) -> String? {
14544
- jsObject[key].fromJSValue()
14646
+ @inlinable public func getItem(key: String) -> String? {
14647
+ let this = jsObject
14648
+ return this[Strings.getItem].function!(this: this, arguments: [_toJSValue(key)]).fromJSValue()!
14545
14649
}
14546
14650
14547
- // XXX: unsupported setter for keys of type String
14651
+ @inlinable public subscript(key: String) -> String? {
14652
+ get {
14653
+ jsObject[key].fromJSValue()
14654
+ }
14655
+ set {
14656
+ jsObject[key] = _toJSValue(newValue)
14657
+ }
14658
+ }
14548
14659
14549
14660
// XXX: unsupported deleter for keys of type String
14550
14661
@@ -15257,6 +15368,11 @@ public class TouchList: JSBridgedClass {
15257
15368
@inlinable public subscript(key: Int) -> Touch? {
15258
15369
jsObject[key].fromJSValue()
15259
15370
}
15371
+
15372
+ @inlinable public func item(index: UInt32) -> Touch? {
15373
+ let this = jsObject
15374
+ return this[Strings.item].function!(this: this, arguments: [_toJSValue(index)]).fromJSValue()!
15375
+ }
15260
15376
}
15261
15377
15262
15378
public enum TouchType: JSString, JSValueCompatible {
@@ -18510,8 +18626,10 @@ public class XSLTProcessor: JSBridgedClass {
18510
18626
@usableFromInline static let getElementsByTagName: JSString = "getElementsByTagName"
18511
18627
@usableFromInline static let getElementsByTagNameNS: JSString = "getElementsByTagNameNS"
18512
18628
@usableFromInline static let getImageData: JSString = "getImageData"
18629
+ @usableFromInline static let getItem: JSString = "getItem"
18513
18630
@usableFromInline static let getLineDash: JSString = "getLineDash"
18514
18631
@usableFromInline static let getModifierState: JSString = "getModifierState"
18632
+ @usableFromInline static let getNamedItem: JSString = "getNamedItem"
18515
18633
@usableFromInline static let getNamedItemNS: JSString = "getNamedItemNS"
18516
18634
@usableFromInline static let getParameter: JSString = "getParameter"
18517
18635
@usableFromInline static let getReader: JSString = "getReader"
0 commit comments