import{_ as t}from"./plugin-vue_export-helper-c27b6911.js";import{r as n,o as a,c as s,a as r,d as i,w as o,e as l,b as c}from"./app-e95fa5d2.js";const p={},d=l(`<p>Check if the network is online;</p><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code>NetworkPlugin<span class="token punctuation">.</span><span class="token function">onLine</span><span class="token punctuation">(</span><span class="token punctuation">)</span> 
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="parameters" tabindex="-1"><a class="header-anchor" href="#parameters" aria-hidden="true">#</a> Parameters</h2><ul><li>None</li></ul><h2 id="return" tabindex="-1"><a class="header-anchor" href="#return" aria-hidden="true">#</a> Return</h2><p>Returns a boolean; true if the network is accessible,<br> false if network connection is lost.</p><h2 id="example" tabindex="-1"><a class="header-anchor" href="#example" aria-hidden="true">#</a> Example</h2><div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">import</span> <span class="token punctuation">{</span> networkPlugin <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@plaoc/plugins&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> isOnline <span class="token operator">=</span> networkPlugin<span class="token punctuation">.</span><span class="token function">onLine</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="platform-support" tabindex="-1"><a class="header-anchor" href="#platform-support" aria-hidden="true">#</a> Platform Support</h2><table><thead><tr><th style="text-align:center;">Property/Method/Event</th><th style="text-align:center;">Android</th><th style="text-align:center;">iOS</th><th style="text-align:center;">Desktop-Dev</th><th style="text-align:center;">Desktop</th></tr></thead><tbody><tr><td style="text-align:center;">onLine</td><td style="text-align:center;">✅</td><td style="text-align:center;">✅</td><td style="text-align:center;">✅</td><td style="text-align:center;">X</td></tr></tbody></table><h2 id="related-links" tabindex="-1"><a class="header-anchor" href="#related-links" aria-hidden="true">#</a> Related Links</h2>`,11);function u(h,k){const e=n("RouterLink");return a(),s("div",null,[d,r("p",null,[i(e,{to:"/en/plaoc-plugin/plugin/network/"},{default:o(()=>[c("NetworkPlugin")]),_:1})])])}const x=t(p,[["render",u],["__file","on-line.html.vue"]]);export{x as default};
