Repository navigation
Expand file tree
/
Copy pathWebKit.d.ts
More file actions
879 lines (531 loc) · 27.9 KB
/
Copy pathWebKit.d.ts
File metadata and controls
879 lines (531 loc) · 27.9 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
/// <reference types="@nativescript/objc-node-api" />
/// <reference path="./Runtime.d.ts" />
/// <reference path="./UIKit.d.ts" />
declare const WKPreviewActionItemIdentifierShare: string;
declare const WKPreviewActionItemIdentifierAddToReadingList: string;
declare const WKWebsiteDataTypeMediaKeys: string;
declare const WKWebsiteDataTypeFileSystem: string;
declare const WKWebsiteDataTypeIndexedDBDatabases: string;
declare const WKWebsiteDataTypeServiceWorkerRegistrations: string;
declare const WKWebsiteDataTypeLocalStorage: string;
declare const WKWebsiteDataTypeCookies: string;
declare const WKWebsiteDataTypeMemoryCache: string;
declare const WKWebsiteDataTypeDiskCache: string;
declare const WKWebsiteDataTypeFetchCache: string;
declare const WKPreviewActionItemIdentifierOpen: string;
declare const WKPreviewActionItemIdentifierCopy: string;
declare const WKWebsiteDataTypeWebSQLDatabases: string;
declare const WKErrorDomain: string;
declare const WKWebsiteDataTypeSessionStorage: string;
declare const NSReadAccessURLDocumentOption: string;
declare const WKWebsiteDataTypeHashSalt: string;
declare const WKWebsiteDataTypeSearchFieldRecentSearches: string;
declare const WKWebsiteDataTypeOfflineWebApplicationCache: string;
declare const WKAudiovisualMediaTypes: {
None: 0,
Audio: 1,
Video: 2,
All: -1,
};
declare const WKDialogResult: {
ShowDefault: 1,
AskAgain: 2,
Handled: 3,
};
declare const WKPermissionDecision: {
Prompt: 0,
Grant: 1,
Deny: 2,
};
declare const WKNavigationResponsePolicy: {
Cancel: 0,
Allow: 1,
Download: 2,
};
declare const WKNavigationType: {
LinkActivated: 0,
FormSubmitted: 1,
BackForward: 2,
Reload: 3,
FormResubmitted: 4,
Other: -1,
};
declare const WKContentMode: {
Recommended: 0,
Mobile: 1,
Desktop: 2,
};
declare const WKCookiePolicy: {
Allow: 0,
Disallow: 1,
};
declare const WKUserScriptInjectionTime: {
Start: 0,
End: 1,
};
declare const WKFullscreenState: {
NotIn: 0,
Entering: 1,
In: 2,
Exiting: 3,
};
declare const WKMediaPlaybackState: {
None: 0,
Playing: 1,
Paused: 2,
Suspended: 3,
};
declare const WKMediaCaptureType: {
Camera: 0,
Microphone: 1,
CameraAndMicrophone: 2,
};
declare const WKDownloadRedirectPolicy: {
Cancel: 0,
Allow: 1,
};
declare const WKSelectionGranularity: {
Dynamic: 0,
Character: 1,
};
declare const WKMediaCaptureState: {
None: 0,
Active: 1,
Muted: 2,
};
declare const WKNavigationActionPolicy: {
Cancel: 0,
Allow: 1,
Download: 2,
};
declare const WKErrorCode: {
Unknown: 1,
WebContentProcessTerminated: 2,
WebViewInvalidated: 3,
JavaScriptExceptionOccurred: 4,
JavaScriptResultTypeIsUnsupported: 5,
ContentRuleListStoreCompileFailed: 6,
ContentRuleListStoreLookUpFailed: 7,
ContentRuleListStoreRemoveFailed: 8,
ContentRuleListStoreVersionMismatch: 9,
AttributedStringContentFailedToLoad: 10,
AttributedStringContentLoadTimedOut: 11,
JavaScriptInvalidFrameTarget: 12,
NavigationAppBoundDomain: 13,
JavaScriptAppBoundDomain: 14,
DuplicateCredential: 15,
MalformedCredential: 16,
CredentialNotFound: 17,
};
declare const WKDataDetectorTypes: {
None: 0,
PhoneNumber: 1,
Link: 2,
Address: 4,
CalendarEvent: 8,
TrackingNumber: 16,
FlightNumber: 32,
LookupSuggestion: 64,
All: -1,
SpotlightSuggestion: 64,
};
declare const WKInactiveSchedulingPolicy: {
Suspend: 0,
Throttle: 1,
None: 2,
};
declare interface WKScriptMessageHandler extends NSObjectProtocol {
userContentControllerDidReceiveScriptMessage(userContentController: WKUserContentController, message: WKScriptMessage): void;
}
declare class WKScriptMessageHandler extends NativeObject implements WKScriptMessageHandler {
}
declare interface WKUIDelegate extends NSObjectProtocol {
webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures?(webView: WKWebView, configuration: WKWebViewConfiguration, navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures): WKWebView;
webViewDidClose?(webView: WKWebView): void;
webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler?(webView: WKWebView, message: string, frame: WKFrameInfo, completionHandler: () => void): void;
webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler?(webView: WKWebView, message: string, frame: WKFrameInfo, completionHandler: (p1: boolean) => void): void;
webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler?(webView: WKWebView, prompt: string, defaultText: string | null, frame: WKFrameInfo, completionHandler: (p1: string) => void | null): void;
webViewRequestMediaCapturePermissionForOriginInitiatedByFrameTypeDecisionHandler?(webView: WKWebView, origin: WKSecurityOrigin, frame: WKFrameInfo, type: interop.Enum<typeof WKMediaCaptureType>, decisionHandler: (p1: interop.Enum<typeof WKPermissionDecision>) => void): void;
webViewRequestDeviceOrientationAndMotionPermissionForOriginInitiatedByFrameDecisionHandler?(webView: WKWebView, origin: WKSecurityOrigin, frame: WKFrameInfo, decisionHandler: (p1: interop.Enum<typeof WKPermissionDecision>) => void): void;
webViewShouldPreviewElement?(webView: WKWebView, elementInfo: WKPreviewElementInfo): boolean;
webViewPreviewingViewControllerForElementDefaultActions?(webView: WKWebView, elementInfo: WKPreviewElementInfo, previewActions: NSArray<interop.Object> | Array<interop.Object>): UIViewController;
webViewCommitPreviewingViewController?(webView: WKWebView, previewingViewController: UIViewController): void;
webViewContextMenuConfigurationForElementCompletionHandler?(webView: WKWebView, elementInfo: WKContextMenuElementInfo, completionHandler: (p1: UIContextMenuConfiguration) => void | null): void;
webViewContextMenuWillPresentForElement?(webView: WKWebView, elementInfo: WKContextMenuElementInfo): void;
webViewContextMenuForElementWillCommitWithAnimator?(webView: WKWebView, elementInfo: WKContextMenuElementInfo, animator: UIContextMenuInteractionCommitAnimating): void;
webViewContextMenuDidEndForElement?(webView: WKWebView, elementInfo: WKContextMenuElementInfo): void;
webViewShowLockdownModeFirstUseMessageCompletionHandler?(webView: WKWebView, message: string, completionHandler: (p1: interop.Enum<typeof WKDialogResult>) => void): void;
webViewWillPresentEditMenuWithAnimator?(webView: WKWebView, animator: UIEditMenuInteractionAnimating): void;
webViewWillDismissEditMenuWithAnimator?(webView: WKWebView, animator: UIEditMenuInteractionAnimating): void;
}
declare class WKUIDelegate extends NativeObject implements WKUIDelegate {
}
declare interface WKScriptMessageHandlerWithReply extends NSObjectProtocol {
userContentControllerDidReceiveScriptMessageReplyHandler(userContentController: WKUserContentController, message: WKScriptMessage, replyHandler: (p1: interop.Object, p2: string) => void | null): void;
}
declare class WKScriptMessageHandlerWithReply extends NativeObject implements WKScriptMessageHandlerWithReply {
}
declare interface WKNavigationDelegate extends NSObjectProtocol {
webViewDecidePolicyForNavigationActionDecisionHandler?(webView: WKWebView, navigationAction: WKNavigationAction, decisionHandler: (p1: interop.Enum<typeof WKNavigationActionPolicy>) => void): void;
webViewDecidePolicyForNavigationActionPreferencesDecisionHandler?(webView: WKWebView, navigationAction: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: (p1: interop.Enum<typeof WKNavigationActionPolicy>, p2: WKWebpagePreferences) => void): void;
webViewDecidePolicyForNavigationResponseDecisionHandler?(webView: WKWebView, navigationResponse: WKNavigationResponse, decisionHandler: (p1: interop.Enum<typeof WKNavigationResponsePolicy>) => void): void;
webViewDidStartProvisionalNavigation?(webView: WKWebView, navigation: WKNavigation): void;
webViewDidReceiveServerRedirectForProvisionalNavigation?(webView: WKWebView, navigation: WKNavigation): void;
webViewDidFailProvisionalNavigationWithError?(webView: WKWebView, navigation: WKNavigation, error: NSError): void;
webViewDidCommitNavigation?(webView: WKWebView, navigation: WKNavigation): void;
webViewDidFinishNavigation?(webView: WKWebView, navigation: WKNavigation): void;
webViewDidFailNavigationWithError?(webView: WKWebView, navigation: WKNavigation, error: NSError): void;
webViewDidReceiveAuthenticationChallengeCompletionHandler?(webView: WKWebView, challenge: NSURLAuthenticationChallenge, completionHandler: (p1: interop.Enum<typeof NSURLSessionAuthChallengeDisposition>, p2: NSURLCredential) => void | null): void;
webViewWebContentProcessDidTerminate?(webView: WKWebView): void;
webViewAuthenticationChallengeShouldAllowDeprecatedTLS?(webView: WKWebView, challenge: NSURLAuthenticationChallenge, decisionHandler: (p1: boolean) => void): void;
webViewNavigationActionDidBecomeDownload?(webView: WKWebView, navigationAction: WKNavigationAction, download: WKDownload): void;
webViewNavigationResponseDidBecomeDownload?(webView: WKWebView, navigationResponse: WKNavigationResponse, download: WKDownload): void;
}
declare class WKNavigationDelegate extends NativeObject implements WKNavigationDelegate {
}
declare interface WKHTTPCookieStoreObserver extends NSObjectProtocol {
cookiesDidChangeInCookieStore?(cookieStore: WKHTTPCookieStore): void;
}
declare class WKHTTPCookieStoreObserver extends NativeObject implements WKHTTPCookieStoreObserver {
}
declare interface WKURLSchemeHandler extends NSObjectProtocol {
webViewStartURLSchemeTask(webView: WKWebView, urlSchemeTask: WKURLSchemeTask): void;
webViewStopURLSchemeTask(webView: WKWebView, urlSchemeTask: WKURLSchemeTask): void;
}
declare class WKURLSchemeHandler extends NativeObject implements WKURLSchemeHandler {
}
declare interface WKURLSchemeTask extends NSObjectProtocol {
readonly request: NSURLRequest;
didReceiveResponse(response: NSURLResponse): void;
didReceiveData(data: NSData): void;
didFinish(): void;
didFailWithError(error: NSError): void;
}
declare class WKURLSchemeTask extends NativeObject implements WKURLSchemeTask {
}
declare interface WKDownloadDelegate extends NSObjectProtocol {
downloadDecideDestinationUsingResponseSuggestedFilenameCompletionHandler(download: WKDownload, response: NSURLResponse, suggestedFilename: string, completionHandler: (p1: NSURL) => void | null): void;
downloadWillPerformHTTPRedirectionNewRequestDecisionHandler?(download: WKDownload, response: NSHTTPURLResponse, request: NSURLRequest, decisionHandler: (p1: interop.Enum<typeof WKDownloadRedirectPolicy>) => void): void;
downloadDidReceiveAuthenticationChallengeCompletionHandler?(download: WKDownload, challenge: NSURLAuthenticationChallenge, completionHandler: (p1: interop.Enum<typeof NSURLSessionAuthChallengeDisposition>, p2: NSURLCredential) => void | null): void;
downloadDidFinish?(download: WKDownload): void;
downloadDidFailWithErrorResumeData?(download: WKDownload, error: NSError, resumeData: NSData | null): void;
}
declare class WKDownloadDelegate extends NativeObject implements WKDownloadDelegate {
}
declare interface WKPreviewActionItem extends UIPreviewActionItem {
readonly identifier: string;
}
declare class WKPreviewActionItem extends NativeObject implements WKPreviewActionItem {
}
declare class WKFindResult extends NSObject implements NSCopying {
readonly matchFound: boolean;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKNavigationAction extends NSObject {
readonly sourceFrame: WKFrameInfo;
readonly targetFrame: WKFrameInfo;
readonly navigationType: interop.Enum<typeof WKNavigationType>;
readonly request: NSURLRequest;
readonly shouldPerformDownload: boolean;
}
declare class WKWebViewConfiguration extends NSObject implements NSSecureCoding, NSCopying {
processPool: WKProcessPool;
preferences: WKPreferences;
userContentController: WKUserContentController;
websiteDataStore: WKWebsiteDataStore;
suppressesIncrementalRendering: boolean;
applicationNameForUserAgent: string;
allowsAirPlayForMediaPlayback: boolean;
upgradeKnownHostsToHTTPS: boolean;
mediaTypesRequiringUserActionForPlayback: interop.Enum<typeof WKAudiovisualMediaTypes>;
defaultWebpagePreferences: WKWebpagePreferences;
limitsNavigationsToAppBoundDomains: boolean;
allowsInlinePredictions: boolean;
allowsInlineMediaPlayback: boolean;
selectionGranularity: interop.Enum<typeof WKSelectionGranularity>;
allowsPictureInPictureMediaPlayback: boolean;
dataDetectorTypes: interop.Enum<typeof WKDataDetectorTypes>;
ignoresViewportScaleLimits: boolean;
setURLSchemeHandlerForURLScheme(urlSchemeHandler: WKURLSchemeHandler | null, urlScheme: string): void;
urlSchemeHandlerForURLScheme(urlScheme: string): WKURLSchemeHandler;
supportsAdaptiveImageGlyph: boolean;
mediaPlaybackRequiresUserAction: boolean;
mediaPlaybackAllowsAirPlay: boolean;
requiresUserActionForMediaPlayback: boolean;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKWebsiteDataStore extends NSObject implements NSSecureCoding {
static defaultDataStore(): WKWebsiteDataStore;
static nonPersistentDataStore(): WKWebsiteDataStore;
readonly isPersistent: boolean;
static allWebsiteDataTypes(): NSSet;
fetchDataRecordsOfTypesCompletionHandler(dataTypes: NSSet, completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>) => void): void;
removeDataOfTypesForDataRecordsCompletionHandler(dataTypes: NSSet, dataRecords: NSArray<interop.Object> | Array<interop.Object>, completionHandler: () => void): void;
removeDataOfTypesModifiedSinceCompletionHandler(dataTypes: NSSet, date: NSDate, completionHandler: () => void): void;
readonly httpCookieStore: WKHTTPCookieStore;
readonly identifier: NSUUID;
static dataStoreForIdentifier(identifier: NSUUID): WKWebsiteDataStore;
static removeDataStoreForIdentifierCompletionHandler(identifier: NSUUID, completionHandler: (p1: NSError) => void | null): void;
static fetchAllDataStoreIdentifiers(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>) => void): void;
get proxyConfigurations(): NSArray;
set proxyConfigurations(value: NSArray<interop.Object> | Array<interop.Object>);
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class WKUserScript extends NSObject implements NSCopying {
readonly source: string;
readonly injectionTime: interop.Enum<typeof WKUserScriptInjectionTime>;
readonly isForMainFrameOnly: boolean;
initWithSourceInjectionTimeForMainFrameOnly(source: string, injectionTime: interop.Enum<typeof WKUserScriptInjectionTime>, forMainFrameOnly: boolean): this;
initWithSourceInjectionTimeForMainFrameOnlyInContentWorld(source: string, injectionTime: interop.Enum<typeof WKUserScriptInjectionTime>, forMainFrameOnly: boolean, contentWorld: WKContentWorld): this;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKSnapshotConfiguration extends NSObject implements NSCopying {
rect: CGRect;
snapshotWidth: NSNumber;
afterScreenUpdates: boolean;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKProcessPool extends NSObject implements NSSecureCoding {
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class WKPreviewElementInfo extends NSObject implements NSCopying {
readonly linkURL: NSURL;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKNavigationResponse extends NSObject {
readonly isForMainFrame: boolean;
readonly response: NSURLResponse;
readonly canShowMIMEType: boolean;
}
declare class WKNavigation extends NSObject {
readonly effectiveContentMode: interop.Enum<typeof WKContentMode>;
}
declare class WKHTTPCookieStore extends NSObject {
getAllCookies(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>) => void): void;
setCookieCompletionHandler(cookie: NSHTTPCookie, completionHandler: () => void | null): void;
deleteCookieCompletionHandler(cookie: NSHTTPCookie, completionHandler: () => void | null): void;
addObserver(observer: WKHTTPCookieStoreObserver): void;
removeObserver(observer: WKHTTPCookieStoreObserver): void;
setCookiePolicyCompletionHandler(policy: interop.Enum<typeof WKCookiePolicy>, completionHandler: () => void | null): void;
getCookiePolicy(completionHandler: (p1: interop.Enum<typeof WKCookiePolicy>) => void): void;
}
declare class WKFrameInfo extends NSObject implements NSCopying {
readonly isMainFrame: boolean;
readonly request: NSURLRequest;
readonly securityOrigin: WKSecurityOrigin;
readonly webView: WKWebView | null;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKWebpagePreferences extends NSObject {
preferredContentMode: interop.Enum<typeof WKContentMode>;
allowsContentJavaScript: boolean;
isLockdownModeEnabled: boolean;
}
declare class WKWebsiteDataRecord extends NSObject {
readonly displayName: string;
readonly dataTypes: NSSet;
}
declare class WKScriptMessage extends NSObject {
readonly body: interop.Object;
readonly webView: WKWebView;
readonly frameInfo: WKFrameInfo;
readonly name: string;
readonly world: WKContentWorld;
}
declare class WKPDFConfiguration extends NSObject implements NSCopying {
rect: CGRect;
allowTransparentBackground: boolean;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKBackForwardListItem extends NSObject {
readonly URL: NSURL;
readonly title: string;
readonly initialURL: NSURL;
}
declare class WKPreferences extends NSObject implements NSSecureCoding {
minimumFontSize: number;
javaScriptCanOpenWindowsAutomatically: boolean;
isFraudulentWebsiteWarningEnabled: boolean;
shouldPrintBackgrounds: boolean;
isTextInteractionEnabled: boolean;
isSiteSpecificQuirksModeEnabled: boolean;
isElementFullscreenEnabled: boolean;
inactiveSchedulingPolicy: interop.Enum<typeof WKInactiveSchedulingPolicy>;
javaScriptEnabled: boolean;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class WKContentRuleListStore extends NSObject {
static defaultStore<This extends abstract new (...args: any) => any>(this: This): InstanceType<This>;
static storeWithURL<This extends abstract new (...args: any) => any>(this: This, url: NSURL): InstanceType<This>;
compileContentRuleListForIdentifierEncodedContentRuleListCompletionHandler(identifier: string, encodedContentRuleList: string, completionHandler: (p1: WKContentRuleList, p2: NSError) => void): void;
lookUpContentRuleListForIdentifierCompletionHandler(identifier: string, completionHandler: (p1: WKContentRuleList, p2: NSError) => void): void;
removeContentRuleListForIdentifierCompletionHandler(identifier: string, completionHandler: (p1: NSError) => void): void;
getAvailableContentRuleListIdentifiers(completionHandler: (p1: NSArray<interop.Object> | Array<interop.Object>) => void): void;
}
declare class WKBackForwardList extends NSObject {
readonly currentItem: WKBackForwardListItem;
readonly backItem: WKBackForwardListItem;
readonly forwardItem: WKBackForwardListItem;
itemAtIndex(index: number): WKBackForwardListItem;
readonly backList: NSArray;
readonly forwardList: NSArray;
}
declare class WKWindowFeatures extends NSObject {
readonly menuBarVisibility: NSNumber;
readonly statusBarVisibility: NSNumber;
readonly toolbarsVisibility: NSNumber;
readonly allowsResizing: NSNumber;
readonly x: NSNumber;
readonly y: NSNumber;
readonly width: NSNumber;
readonly height: NSNumber;
}
declare class WKContentRuleList extends NSObject {
readonly identifier: string;
}
declare class WKContentWorld extends NSObject {
static readonly pageWorld: WKContentWorld;
static readonly defaultClientWorld: WKContentWorld;
static worldWithName(name: string): WKContentWorld;
readonly name: string;
}
declare class WKFindConfiguration extends NSObject implements NSCopying {
backwards: boolean;
caseSensitive: boolean;
wraps: boolean;
copyWithZone(zone: interop.PointerConvertible): interop.Object;
}
declare class WKUserContentController extends NSObject implements NSSecureCoding {
readonly userScripts: NSArray;
addUserScript(userScript: WKUserScript): void;
removeAllUserScripts(): void;
addScriptMessageHandlerContentWorldName(scriptMessageHandler: WKScriptMessageHandler, world: WKContentWorld, name: string): void;
addScriptMessageHandlerWithReplyContentWorldName(scriptMessageHandlerWithReply: WKScriptMessageHandlerWithReply, contentWorld: WKContentWorld, name: string): void;
addScriptMessageHandlerName(scriptMessageHandler: WKScriptMessageHandler, name: string): void;
removeScriptMessageHandlerForNameContentWorld(name: string, contentWorld: WKContentWorld): void;
removeScriptMessageHandlerForName(name: string): void;
removeAllScriptMessageHandlersFromContentWorld(contentWorld: WKContentWorld): void;
removeAllScriptMessageHandlers(): void;
addContentRuleList(contentRuleList: WKContentRuleList): void;
removeContentRuleList(contentRuleList: WKContentRuleList): void;
removeAllContentRuleLists(): void;
static readonly supportsSecureCoding: boolean;
encodeWithCoder(coder: NSCoder): void;
initWithCoder(coder: NSCoder): this;
}
declare class WKSecurityOrigin extends NSObject {
readonly protocol: string;
readonly host: string;
readonly port: number;
}
declare class WKDownload extends NSObject implements NSProgressReporting {
readonly originalRequest: NSURLRequest;
readonly webView: WKWebView | null;
delegate: WKDownloadDelegate | null;
cancel(completionHandler: (p1: NSData) => void | null): void;
readonly progress: NSProgress;
isEqual(object: interop.Object): boolean;
readonly hash: number;
readonly superclass: interop.Object;
class(): interop.Object;
self(): this;
performSelector(aSelector: string): interop.Object;
performSelectorWithObject(aSelector: string, object: interop.Object): interop.Object;
performSelectorWithObjectWithObject(aSelector: string, object1: interop.Object, object2: interop.Object): interop.Object;
readonly isProxy: boolean;
isKindOfClass(aClass: interop.Object): boolean;
isMemberOfClass(aClass: interop.Object): boolean;
conformsToProtocol(aProtocol: interop.PointerConvertible): boolean;
respondsToSelector(aSelector: string): boolean;
retain(): this;
release(): void;
autorelease(): this;
retainCount(): number;
readonly zone: interop.Pointer;
readonly description: string;
readonly debugDescription: string;
}
declare class WKContextMenuElementInfo extends NSObject {
readonly linkURL: NSURL;
}
declare class WKWebView extends UIView {
readonly configuration: WKWebViewConfiguration;
navigationDelegate: WKNavigationDelegate;
UIDelegate: WKUIDelegate;
readonly backForwardList: WKBackForwardList;
initWithFrameConfiguration(frame: CGRect, configuration: WKWebViewConfiguration): this;
initWithCoder(coder: NSCoder): this;
loadRequest(request: NSURLRequest): WKNavigation;
loadFileURLAllowingReadAccessToURL(URL: NSURL, readAccessURL: NSURL): WKNavigation;
loadHTMLStringBaseURL(string: string, baseURL: NSURL | null): WKNavigation;
loadDataMIMETypeCharacterEncodingNameBaseURL(data: NSData, MIMEType: string, characterEncodingName: string, baseURL: NSURL): WKNavigation;
goToBackForwardListItem(item: WKBackForwardListItem): WKNavigation;
readonly title: string;
readonly URL: NSURL;
readonly isLoading: boolean;
readonly estimatedProgress: number;
readonly hasOnlySecureContent: boolean;
readonly serverTrust: interop.Pointer;
readonly canGoBack: boolean;
readonly canGoForward: boolean;
goBack(): WKNavigation;
goForward(): WKNavigation;
reload(): WKNavigation;
reloadFromOrigin(): WKNavigation;
stopLoading(): void;
evaluateJavaScriptCompletionHandler(javaScriptString: string, completionHandler: (p1: interop.Object, p2: NSError) => void | null): void;
evaluateJavaScriptInFrameInContentWorldCompletionHandler(javaScriptString: string, frame: WKFrameInfo | null, contentWorld: WKContentWorld, completionHandler: (p1: interop.Object, p2: NSError) => void | null): void;
callAsyncJavaScriptArgumentsInFrameInContentWorldCompletionHandler(functionBody: string, arguments$: NSDictionary<interop.Object, interop.Object> | Record<interop.Object, interop.Object> | null, frame: WKFrameInfo | null, contentWorld: WKContentWorld, completionHandler: (p1: interop.Object, p2: NSError) => void | null): void;
closeAllMediaPresentationsWithCompletionHandler(completionHandler: () => void | null): void;
closeAllMediaPresentations(): void;
pauseAllMediaPlaybackWithCompletionHandler(completionHandler: () => void | null): void;
pauseAllMediaPlayback(completionHandler: () => void | null): void;
setAllMediaPlaybackSuspendedCompletionHandler(suspended: boolean, completionHandler: () => void | null): void;
resumeAllMediaPlayback(completionHandler: () => void | null): void;
suspendAllMediaPlayback(completionHandler: () => void | null): void;
requestMediaPlaybackStateWithCompletionHandler(completionHandler: (p1: interop.Enum<typeof WKMediaPlaybackState>) => void): void;
requestMediaPlaybackState(completionHandler: (p1: interop.Enum<typeof WKMediaPlaybackState>) => void): void;
readonly cameraCaptureState: interop.Enum<typeof WKMediaCaptureState>;
readonly microphoneCaptureState: interop.Enum<typeof WKMediaCaptureState>;
setCameraCaptureStateCompletionHandler(state: interop.Enum<typeof WKMediaCaptureState>, completionHandler: () => void | null): void;
setMicrophoneCaptureStateCompletionHandler(state: interop.Enum<typeof WKMediaCaptureState>, completionHandler: () => void | null): void;
takeSnapshotWithConfigurationCompletionHandler(snapshotConfiguration: WKSnapshotConfiguration | null, completionHandler: (p1: UIImage, p2: NSError) => void | null): void;
createPDFWithConfigurationCompletionHandler(pdfConfiguration: WKPDFConfiguration | null, completionHandler: (p1: NSData, p2: NSError) => void | null): void;
createWebArchiveDataWithCompletionHandler(completionHandler: (p1: NSData, p2: NSError) => void): void;
allowsBackForwardNavigationGestures: boolean;
customUserAgent: string;
allowsLinkPreview: boolean;
readonly scrollView: UIScrollView;
pageZoom: number;
findStringWithConfigurationCompletionHandler(string: string, configuration: WKFindConfiguration | null, completionHandler: (p1: WKFindResult) => void): void;
static handlesURLScheme(urlScheme: string): boolean;
startDownloadUsingRequestCompletionHandler(request: NSURLRequest, completionHandler: (p1: WKDownload) => void): void;
resumeDownloadFromResumeDataCompletionHandler(resumeData: NSData, completionHandler: (p1: WKDownload) => void): void;
mediaType: string;
interactionState: interop.Object;
loadSimulatedRequestResponseResponseData(request: NSURLRequest, response: NSURLResponse, data: NSData): WKNavigation;
loadSimulatedRequestWithResponseResponseData(request: NSURLRequest, response: NSURLResponse, data: NSData): WKNavigation;
loadFileRequestAllowingReadAccessToURL(request: NSURLRequest, readAccessURL: NSURL): WKNavigation;
loadSimulatedRequestResponseHTMLString(request: NSURLRequest, string: string): WKNavigation;
loadSimulatedRequestWithResponseHTMLString(request: NSURLRequest, string: string): WKNavigation;
readonly themeColor: UIColor;
underPageBackgroundColor: UIColor;
readonly fullscreenState: interop.Enum<typeof WKFullscreenState>;
readonly minimumViewportInset: UIEdgeInsets;
readonly maximumViewportInset: UIEdgeInsets;
setMinimumViewportInsetMaximumViewportInset(minimumViewportInset: UIEdgeInsets, maximumViewportInset: UIEdgeInsets): void;
isFindInteractionEnabled: boolean;
readonly findInteraction: UIFindInteraction;
isInspectable: boolean;
readonly isWritingToolsActive: boolean;
readonly certificateChain: NSArray;
}