You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// This indicates slot specified with `selector` on `TeadsWebViewHelper` init has not been found in webview html DOM.
34
+
/// This indicates slot specified with `selector` on ``TeadsWebViewHelper/init(webView:selector:delegate:)`` has **NOT** been found in webview html DOM.
34
35
@objcoptionalfunc webViewHelperSlotNotFound()
35
36
36
37
/// This is called when an error occured with the reason.
@@ -56,15 +57,19 @@ import WebKit
56
57
57
58
// latest slot position updated
58
59
privatevarslotPosition:SlotPosition?
59
-
privatevarisSlotFound:Bool{
60
-
return slotPosition !=nil
60
+
privatevarisSlotNotFound:Bool{
61
+
return slotPosition ==nil
61
62
}
62
63
63
64
// width of element in Web content, needed to compute ratio
/// - webView: webView where you want to add your ad. The receiver holds a weak reference only.
82
-
/// - selector: name of the html identifier where you want your slot to open `#mySelector`
87
+
/// - selector: name of the html identifier where you want your slot to open `#mySelector` will pick the first [CSS Selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) found in the DOM
83
88
/// - delegate: optional delegate to follow slot javascript lyfecycle
84
89
///
85
90
/// - Important: should be called from **main Thread**
@@ -109,6 +114,8 @@ import WebKit
109
114
NotificationCenter.default.removeObserver(self)
110
115
}
111
116
117
+
/// Track url requests change in order to reset adView and position tracking
118
+
/// When position is located a new time, alert through ``TeadsWebViewHelperDelegate/webViewHelperSlotFoundSuccessfully()``
112
119
overridepublicfunc observeValue(forKeyPath keyPath:String?, of _:Any?, change:[NSKeyValueChangeKey:Any]?, context _:UnsafeMutableRawPointer?){
0 commit comments