-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDOM.patch
More file actions
52 lines (49 loc) · 2.17 KB
/
DOM.patch
File metadata and controls
52 lines (49 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/Sources/DOM/Generated.swift b/Sources/DOM/Generated.swift
index 9fa75ba..0339568 100644
--- a/Sources/DOM/Generated.swift
+++ b/Sources/DOM/Generated.swift
@@ -1094,6 +1094,17 @@ public class BeforeUnloadEvent: Event {
public required init(unsafelyWrapping jsObject: JSObject) { super.init(unsafelyWrapping: jsObject) }
+ @available(*, unavailable)
+ override public var returnValue: Bool {
+ get { !self.returnValueAsString.isEmpty }
+ set {}
+ }
+
+ // renamed because `String` is not compatible with `Bool`
+ @inlinable public var returnValueAsString: String {
+ get { self.jsObject[Strings.returnValue].string! }
+ set { self.jsObject[Strings.returnValue] = .string(newValue) }
+ }
}
public enum BitrateMode: JSString, JSValueCompatible {
@@ -24231,14 +24242,6 @@ public enum CanvasImageSource: JSValueCompatible, Any_CanvasImageSource {
let val: CanvasImageSource = .htmlOrSVGImageElement(htmlOrSVGImageElement)
self = val
}
- public init(_ htmlImageElement: HTMLImageElement) {
- let val: HTMLOrSVGImageElement = .htmlImageElement(htmlImageElement)
- self = .init(val)
- }
- public init(_ svgImageElement: SVGImageElement) {
- let val: HTMLOrSVGImageElement = .svgImageElement(svgImageElement)
- self = .init(val)
- }
public init(_ htmlVideoElement: HTMLVideoElement) {
let val: CanvasImageSource = .htmlVideoElement(htmlVideoElement)
self = val
@@ -25289,14 +25292,6 @@ public enum ImageBitmapSource: JSValueCompatible, Any_ImageBitmapSource {
let val: CanvasImageSource = .htmlOrSVGImageElement(htmlOrSVGImageElement)
self = .init(val)
}
- public init(_ htmlImageElement: HTMLImageElement) {
- let val: HTMLOrSVGImageElement = .htmlImageElement(htmlImageElement)
- self = .init(val)
- }
- public init(_ svgImageElement: SVGImageElement) {
- let val: HTMLOrSVGImageElement = .svgImageElement(svgImageElement)
- self = .init(val)
- }
public init(_ htmlVideoElement: HTMLVideoElement) {
let val: CanvasImageSource = .htmlVideoElement(htmlVideoElement)
self = .init(val)