Add connection presence and type checking to `Javascript` tab and to newly added `PhoneGap` tab.