mirror of
https://gitee.com/shuto-github/cordova-plugin-network-information.git
synced 2026-04-22 00:00:02 +08:00
Fixed Network plugin: bad ref in plugin.xml. Added connection constants + additional global to attach to. networks JS now registers its own channel and attaches itself to deviceready as a requirement before firing deviceready.
This commit is contained in:
+3
-1
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
@@ -51,6 +50,9 @@ var me = new NetworkConnection();
|
||||
var timerId = null;
|
||||
var timeout = 500;
|
||||
|
||||
channel.createSticky('onCordovaConnectionReady');
|
||||
channel.waitForInitialization('onCordovaConnectionReady');
|
||||
|
||||
channel.onCordovaReady.subscribe(function() {
|
||||
me.getInfo(function(info) {
|
||||
me.type = info;
|
||||
|
||||
Reference in New Issue
Block a user