<div>Hi all,</div><div><br></div><div>I am realizing the Service Worker function in HTML5, I want some suggestions and tips on how to do this work well.</div><div><br></div><div>I am now working in one company that developing browser based on webkit, not chromium. Because our browser have the demand to run web app. So we need to realizing the Service Worker in HTML5. And I have seen this function has been realized in the browser chromium, I want to realize this function according to chromium.</div><div><br></div><div>Here is the questions:</div><div><br></div><div>1 about IDL:</div><div><span style="font-family: 'Open Sans', sans-serif;">[Exposed=(Window,Worker)]</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;interface </span><dfn id="service-worker-interface" title="ServiceWorker" style="font-style: normal; font-weight: bold; padding: 0px 2px; outline: rgb(238, 238, 238) solid 1px; background-color: rgb(249, 249, 249);">ServiceWorker</dfn><span style="font-family: 'Open Sans', sans-serif;"> :&nbsp;</span></div><div><a href="https://dom.spec.whatwg.org/#eventtarget" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">EventTarget</a><span style="font-family: 'Open Sans', sans-serif;">&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">{&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;readonly attribute </span><a href="http://heycam.github.io/webidl/#idl-USVString" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">USVString</a><span style="font-family: 'Open Sans', sans-serif;"> </span><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-url-attribute" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">scriptURL</a><span style="font-family: 'Open Sans', sans-serif;">;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;readonly attribute </span><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-state-enum" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">ServiceWorkerState</a><span style="font-family: 'Open Sans', sans-serif;"> </span><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-state-attribute" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">state</a><span style="font-family: 'Open Sans', sans-serif;">;&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;void </span><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-postmessage-method" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">postMessage</a><span style="font-family: 'Open Sans', sans-serif;">(any </span><var style="color: rgb(0, 90, 156); font-style: normal;">message</var><span style="font-family: 'Open Sans', sans-serif;">, optional sequence&lt;</span><a href="https://html.spec.whatwg.org/multipage/infrastructure.html#transferable" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">Transferable</a><span style="font-family: 'Open Sans', sans-serif;">&gt; </span><var style="color: rgb(0, 90, 156); font-style: normal;">transfer</var><span style="font-family: 'Open Sans', sans-serif;">);

  //&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">event
  attribute </span><a href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">EventHandler</a><span style="font-family: 'Open Sans', sans-serif;"> </span><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-onstatechange-attribute" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">onstatechange</a><span style="font-family: 'Open Sans', sans-serif;">;
};&nbsp;</span></div><div><code style="font-family: 'Droid Sans Mono', monospace; font-size: 1em; background-color: rgb(238, 238, 238);"><a href="https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-interface" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background: transparent;">ServiceWorker</a></code><span style="font-family: 'Open Sans', sans-serif;"> implements </span><a href="https://html.spec.whatwg.org/multipage/workers.html#abstractworker" style="color: rgb(102, 0, 153); text-decoration: none; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(102, 102, 102); background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">AbstractWorker</a><span style="font-family: 'Open Sans', sans-serif;">;&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;"><br></span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;enum </span><dfn id="service-worker-state-enum" title="State" style="font-style: normal; font-weight: bold; padding: 0px 2px; outline: rgb(238, 238, 238) solid 1px; background-color: rgb(249, 249, 249);">ServiceWorkerState</dfn><span style="font-family: 'Open Sans', sans-serif;">&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">{&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;"installing",&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;"installed",</span></div><div><span style="font-family: 'Open Sans', sans-serif;">"activating",&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;"activated",&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">&nbsp;"redundant"&nbsp;</span></div><div><span style="font-family: 'Open Sans', sans-serif;">};</span></div><div><br></div><div><span style="font-family: 'Open Sans', sans-serif;">when I new one file and .cpp, .h file and added to my project. There was errors like cannot find JSUSVString.h or JSTransferable.h, file name like this it can not find. But My question is How did it created these files and How do I fix questions like this?</span></div><div><span style="font-family: 'Open Sans', sans-serif;"><br></span></div><div><span style="font-family: 'Open Sans', sans-serif;">2: Does webkit group have the plan to fulfill the service worker function and submit this function to one version of webkit release.</span></div><div><span style="font-family: 'Open Sans', sans-serif;"><br></span></div><div><span style="font-family: 'Open Sans', sans-serif;">Above are my questions I want to address in the near future!</span></div><div><span style="font-family: 'Open Sans', sans-serif;"><br></span></div><div><span style="font-family: 'Open Sans', sans-serif;">Thank you very much!</span></div><div><span style="font-family: 'Open Sans', sans-serif;">looking forward to your answer!</span></div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;">Xiaoxu Lian Á®ÏþÐñ<div>tel:18601749056</div><div>xiaoxulian@qq.com</div></div></div><div>&nbsp;</div>