Skip to content

Commit 258c320

Browse files
committed
Update to latest JSKit
1 parent 143d250 commit 258c320

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+117
-117
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
targets: ["DOMKit"]),
1212
],
1313
dependencies: [
14-
.package(name: "JavaScriptKit", url: "https://github.com/j-f1/forked-JavaScriptKit.git", .revision("b62b78e")),
14+
.package(name: "JavaScriptKit", url: "https://github.com/j-f1/forked-JavaScriptKit.git", .revision("29a30e7")),
1515
],
1616
targets: [
1717
.target(

Sources/DOMKit/WebIDL/AbortController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ public class AbortController: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
_signal = ReadonlyAttribute(jsObject: jsObject, name: "signal")
1515
self.jsObject = jsObject
1616
}
1717

1818
public convenience init() {
19-
self.init(withCompatibleObject: AbortController.constructor.new())
19+
self.init(unsafelyWrapping: AbortController.constructor.new())
2020
}
2121

2222
@ReadonlyAttribute

Sources/DOMKit/WebIDL/AbortSignal.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import JavaScriptKit
88
public class AbortSignal: EventTarget {
99
override public class var constructor: JSFunction { JSObject.global.AbortSignal.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_aborted = ReadonlyAttribute(jsObject: jsObject, name: "aborted")
1313
_onabort = OptionalClosureHandler(jsObject: jsObject, name: "onabort")
14-
super.init(withCompatibleObject: jsObject)
14+
super.init(unsafelyWrapping: jsObject)
1515
}
1616

1717
@ReadonlyAttribute

Sources/DOMKit/WebIDL/AbstractRange.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class AbstractRange: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
_startContainer = ReadonlyAttribute(jsObject: jsObject, name: "startContainer")
1515
_startOffset = ReadonlyAttribute(jsObject: jsObject, name: "startOffset")
1616
_endContainer = ReadonlyAttribute(jsObject: jsObject, name: "endContainer")

Sources/DOMKit/WebIDL/AnyChildNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyChildNode: JSBridgedClass, ChildNode {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyDocumentAndElementEventHandlers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyDocumentAndElementEventHandlers: JSBridgedClass, DocumentAndElementEven
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyDocumentOrShadowRoot.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyDocumentOrShadowRoot: JSBridgedClass, DocumentOrShadowRoot {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyElementContentEditable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyElementContentEditable: JSBridgedClass, ElementContentEditable {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyEventListener.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyEventListener: JSBridgedClass, EventListener {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616

Sources/DOMKit/WebIDL/AnyGlobalEventHandlers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyGlobalEventHandlers: JSBridgedClass, GlobalEventHandlers {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyHTMLOrSVGElement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyHTMLOrSVGElement: JSBridgedClass, HTMLOrSVGElement {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyNodeFilter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyNodeFilter: JSBridgedClass, NodeFilter {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616

Sources/DOMKit/WebIDL/AnyNonDocumentTypeChildNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyNonDocumentTypeChildNode: JSBridgedClass, NonDocumentTypeChildNode {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyNonElementParentNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyNonElementParentNode: JSBridgedClass, NonElementParentNode {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyParentNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyParentNode: JSBridgedClass, ParentNode {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnySlotable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnySlotable: JSBridgedClass, Slotable {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyWindowEventHandlers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyWindowEventHandlers: JSBridgedClass, WindowEventHandlers {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyXPathEvaluatorBase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyXPathEvaluatorBase: JSBridgedClass, XPathEvaluatorBase {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616
}

Sources/DOMKit/WebIDL/AnyXPathNSResolver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AnyXPathNSResolver: JSBridgedClass, XPathNSResolver {
1010

1111
let jsObject: JSObject
1212

13-
required init(withCompatibleObject jsObject: JSObject) {
13+
required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616

Sources/DOMKit/WebIDL/Attr.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import JavaScriptKit
88
public class Attr: Node {
99
override public class var constructor: JSFunction { JSObject.global.Attr.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_namespaceURI = ReadonlyAttribute(jsObject: jsObject, name: "namespaceURI")
1313
_prefix = ReadonlyAttribute(jsObject: jsObject, name: "prefix")
1414
_localName = ReadonlyAttribute(jsObject: jsObject, name: "localName")
1515
_name = ReadonlyAttribute(jsObject: jsObject, name: "name")
1616
_value = ReadWriteAttribute(jsObject: jsObject, name: "value")
1717
_ownerElement = ReadonlyAttribute(jsObject: jsObject, name: "ownerElement")
1818
_specified = ReadonlyAttribute(jsObject: jsObject, name: "specified")
19-
super.init(withCompatibleObject: jsObject)
19+
super.init(unsafelyWrapping: jsObject)
2020
}
2121

2222
@ReadonlyAttribute

Sources/DOMKit/WebIDL/Blob.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ public class Blob: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
_size = ReadonlyAttribute(jsObject: jsObject, name: "size")
1515
_type = ReadonlyAttribute(jsObject: jsObject, name: "type")
1616
self.jsObject = jsObject
1717
}
1818

1919
public convenience init(blobParts: [BlobPart], options: BlobPropertyBag = [:]) {
20-
self.init(withCompatibleObject: Blob.constructor.new(blobParts.jsValue(), options.jsValue()))
20+
self.init(unsafelyWrapping: Blob.constructor.new(blobParts.jsValue(), options.jsValue()))
2121
}
2222

2323
public convenience init() {
24-
self.init(withCompatibleObject: Blob.constructor.new())
24+
self.init(unsafelyWrapping: Blob.constructor.new())
2525
}
2626

2727
@ReadonlyAttribute

Sources/DOMKit/WebIDL/CDATASection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import JavaScriptKit
88
public class CDATASection: Text {
99
override public class var constructor: JSFunction { JSObject.global.CDATASection.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
12-
super.init(withCompatibleObject: jsObject)
11+
public required init(unsafelyWrapping jsObject: JSObject) {
12+
super.init(unsafelyWrapping: jsObject)
1313
}
1414
}

Sources/DOMKit/WebIDL/CharacterData.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import JavaScriptKit
88
public class CharacterData: Node, ChildNode, NonDocumentTypeChildNode {
99
override public class var constructor: JSFunction { JSObject.global.CharacterData.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_data = ReadWriteAttribute(jsObject: jsObject, name: "data")
1313
_length = ReadonlyAttribute(jsObject: jsObject, name: "length")
14-
super.init(withCompatibleObject: jsObject)
14+
super.init(unsafelyWrapping: jsObject)
1515
}
1616

1717
@ReadWriteAttribute

Sources/DOMKit/WebIDL/Comment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import JavaScriptKit
88
public class Comment: CharacterData {
99
override public class var constructor: JSFunction { JSObject.global.Comment.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
12-
super.init(withCompatibleObject: jsObject)
11+
public required init(unsafelyWrapping jsObject: JSObject) {
12+
super.init(unsafelyWrapping: jsObject)
1313
}
1414

1515
public convenience init(data: String = "") {
16-
self.init(withCompatibleObject: Comment.constructor.new(data.jsValue()))
16+
self.init(unsafelyWrapping: Comment.constructor.new(data.jsValue()))
1717
}
1818
}

Sources/DOMKit/WebIDL/CustomEvent.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import JavaScriptKit
88
public class CustomEvent: Event {
99
override public class var constructor: JSFunction { JSObject.global.CustomEvent.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_detail = ReadonlyAttribute(jsObject: jsObject, name: "detail")
13-
super.init(withCompatibleObject: jsObject)
13+
super.init(unsafelyWrapping: jsObject)
1414
}
1515

1616
public convenience init(type: String, eventInitDict: CustomEventInit = [:]) {
17-
self.init(withCompatibleObject: CustomEvent.constructor.new(type.jsValue(), eventInitDict.jsValue()))
17+
self.init(unsafelyWrapping: CustomEvent.constructor.new(type.jsValue(), eventInitDict.jsValue()))
1818
}
1919

2020
@ReadonlyAttribute

Sources/DOMKit/WebIDL/DOMException.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ public class DOMException: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
_name = ReadonlyAttribute(jsObject: jsObject, name: "name")
1515
_message = ReadonlyAttribute(jsObject: jsObject, name: "message")
1616
_code = ReadonlyAttribute(jsObject: jsObject, name: "code")
1717
self.jsObject = jsObject
1818
}
1919

2020
public convenience init(message: String = "", name: String = "Error") {
21-
self.init(withCompatibleObject: DOMException.constructor.new(message.jsValue(), name.jsValue()))
21+
self.init(unsafelyWrapping: DOMException.constructor.new(message.jsValue(), name.jsValue()))
2222
}
2323

2424
@ReadonlyAttribute

Sources/DOMKit/WebIDL/DOMImplementation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class DOMImplementation: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616

Sources/DOMKit/WebIDL/DOMStringMap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class DOMStringMap: JSBridgedClass {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
self.jsObject = jsObject
1515
}
1616

Sources/DOMKit/WebIDL/DOMTokenList.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class DOMTokenList: JSBridgedClass, Sequence {
1010

1111
public let jsObject: JSObject
1212

13-
public required init(withCompatibleObject jsObject: JSObject) {
13+
public required init(unsafelyWrapping jsObject: JSObject) {
1414
_length = ReadonlyAttribute(jsObject: jsObject, name: "length")
1515
self.jsObject = jsObject
1616
}

Sources/DOMKit/WebIDL/Document.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import JavaScriptKit
88
public class Document: Node, DocumentOrShadowRoot, NonElementParentNode, ParentNode, XPathEvaluatorBase {
99
override public class var constructor: JSFunction { JSObject.global.Document.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_implementation = ReadonlyAttribute(jsObject: jsObject, name: "implementation")
1313
_URL = ReadonlyAttribute(jsObject: jsObject, name: "URL")
1414
_documentURI = ReadonlyAttribute(jsObject: jsObject, name: "documentURI")
@@ -19,11 +19,11 @@ public class Document: Node, DocumentOrShadowRoot, NonElementParentNode, ParentN
1919
_contentType = ReadonlyAttribute(jsObject: jsObject, name: "contentType")
2020
_doctype = ReadonlyAttribute(jsObject: jsObject, name: "doctype")
2121
_documentElement = ReadonlyAttribute(jsObject: jsObject, name: "documentElement")
22-
super.init(withCompatibleObject: jsObject)
22+
super.init(unsafelyWrapping: jsObject)
2323
}
2424

2525
public convenience init() {
26-
self.init(withCompatibleObject: Document.constructor.new())
26+
self.init(unsafelyWrapping: Document.constructor.new())
2727
}
2828

2929
@ReadonlyAttribute

Sources/DOMKit/WebIDL/DocumentFragment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import JavaScriptKit
88
public class DocumentFragment: Node, NonElementParentNode, ParentNode {
99
override public class var constructor: JSFunction { JSObject.global.DocumentFragment.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
12-
super.init(withCompatibleObject: jsObject)
11+
public required init(unsafelyWrapping jsObject: JSObject) {
12+
super.init(unsafelyWrapping: jsObject)
1313
}
1414

1515
public convenience init() {
16-
self.init(withCompatibleObject: DocumentFragment.constructor.new())
16+
self.init(unsafelyWrapping: DocumentFragment.constructor.new())
1717
}
1818
}

Sources/DOMKit/WebIDL/DocumentType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import JavaScriptKit
88
public class DocumentType: Node, ChildNode {
99
override public class var constructor: JSFunction { JSObject.global.DocumentType.function! }
1010

11-
public required init(withCompatibleObject jsObject: JSObject) {
11+
public required init(unsafelyWrapping jsObject: JSObject) {
1212
_name = ReadonlyAttribute(jsObject: jsObject, name: "name")
1313
_publicId = ReadonlyAttribute(jsObject: jsObject, name: "publicId")
1414
_systemId = ReadonlyAttribute(jsObject: jsObject, name: "systemId")
15-
super.init(withCompatibleObject: jsObject)
15+
super.init(unsafelyWrapping: jsObject)
1616
}
1717

1818
@ReadonlyAttribute

0 commit comments

Comments
 (0)