added navigator online and offline event