"online" is accepted as a word now, but the navigator.onLine property was added in IE4 (released in 1997) back when "on line" was the conventional spelling.
As far as I'm aware (from personal experience), "online" has been the common form when talking about computers since at least the 1980s, if not before.
But maybe whoever added that particular property to IE4 wasn't familar with common (in computer circles) usage...