<div dir="ltr">you're right....I'm on it now! Thanks a lot!<br></div><div dir="auto"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 18 de octubre de 2019 5:26 p.m., Michael Van Canneyt <<a href="mailto:michael@freepascal.org" rel="noreferrer" target="_blank">michael@freepascal.org</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On Fri, 18 Oct 2019, Pedro Pablo Oviedo Vera wrote:<br>
<br>
> I'm try learn about APIOffline and I need applicationCache method from<br>
> window class....but it has not that....so I written something as a draft<br>
> ....I'm not sure....:-(...:here I go:<br>
><br>
> (* in order to give support to method window.applicationOffline *)<br>
> TJSnsrefcnt = integer;<br>
> TJSnsISupports = class;<br>
> TJSnsIDOMOfflineResourcesList = class;<br>
><br>
> TJSnsIDOMEventListenerEvent = TJSEvent;<br>
><br>
> TJSnsIDOMEventListener = reference to function(aEvent:<br>
> TJSnsIDOMEventListenerEvent):Boolean;<br>
> TJSnsVoidIDOMEventHandler = reference to procedure(aUrl: TJSDOMString);<br>
><br>
> TJSnsIDOMOfflineResourcesList = class external name<br>
> 'nsIDOMOfflineResourcesList'(TJSnsISupport)<br>
> private<br>
> fmozItems : TJSnsIDOMOfflineResourseList; external name 'mozItems';<br>
> fmozLength : longint; external name 'mozLength';<br>
> fonerror : TJSnsIDOMEventListener; external name 'onerror';<br>
> fonnoupdate : TJSnsIDOMEventListener; external name 'onnoupdate';<br>
> fonprogress : TJSnsIDOMEventListener; external name 'onprogress';<br>
> fonupdateready : TJSnsIDOMEventListener; external name 'onupdateready';<br>
> foncached : TJSnsIDOMEventListener; external name 'oncached';<br>
> fstatus : word; external name 'status';<br>
> public<br>
> const<br>
> UNCACHED = 0;<br>
> IDLE = 1;<br>
> CHECKIG = 2;<br>
> DOWNLOADING = 3;<br>
> UPDATEREADY = 4;<br>
> OBSOLETE = 5;<br>
> public<br>
> procedure addEventListener(aname : string; aListener :<br>
> TJSnsIDOMEventHandler);<br>
> procedure addEventListener(aname : string; aListener : TJSRawEventHandler);<br>
><br>
> function mozHasItem(aUrl: TJSDOMString): Boolean;<br>
> function mozItem(aIndex: longint): TJSDOMString;<br>
> procedure mozaAdd(aUrl: TJSDOMString);<br>
> procedure mozRemove(aUrl: TJSDOMString);<br>
> procedure swapCache;<br>
> procedure update;<br>
><br>
> property mozItems : TJSnsIDOMOfflineResourseList read fmozItems;<br>
> property mozLength : word read fmozLength ;<br>
> property status : word read fstatus;<br>
><br>
> end;<br>
><br>
> TJSnsISupports = class external name 'nsISupport'<br>
> public<br>
> function AddRef: TJSnsrefcnt; ??<br>
> procedure QueryInterface(aUuid: TJSnsIIDRef?; aParams: array of JSValue);<br>
> function Release: TJSnsrefcnt;<br>
> end;<br>
><br>
> (* in window class .....*)<br>
> function applicationCache: TJSnsIDOMOfflineResourceList;<br>
><br>
> .......question is......is it ok?<br>
<br>
It looks correct, but this API is deprecated. <br>
You should use service workers instead.<br>
<br>
Michael.<br>
_______________________________________________<br>
Pas2js maillist - <a href="mailto:Pas2js@lists.freepascal.org" rel="noreferrer noreferrer" target="_blank">Pas2js@lists.freepascal.org</a><br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js</a><br>
</blockquote></div>