Differences Between Safari Mobile and Desktop

July 7, 2012

It's interesting to note the differences between the window object in the mobile and desktop versions of the Safari browser. Some things make sense (e.g., touch events) but others are fairly cryptic.

Mobile Safari only

canSetSearchEngine: <CanSetSearchEngineScriptObject: 0x1dd22ee0> DeviceMotionEvent: DeviceMotionEventConstructor DeviceOrientationEvent: DeviceOrientationEventConstructor getSearchEngine: <GetSearchEngineScriptObject: 0x1ed83360> ondevicemotion: null ondeviceorientation: null ongesturechange: null ongestureend: null ongesturestart: null onorientationchange: null ontouchcancel: null ontouchend: null ontouchmove: null ontouchstart: null orientation: 0 setSearchEngine: <SetSearchEngineScriptObject: 0x1ddf03a0> Touch: TouchConstructor TouchEvent: TouchEventConstructor TouchList: TouchListConstructor WebKitCSSRegionRule: WebKitCSSRegionRuleConstructor

Desktop Safari only

HTMLMeterElement: HTMLMeterElementConstructor HTMLProgressElement: HTMLProgressElementConstructor HTMLTrackElement: HTMLTrackElementConstructor Notification: NotificationConstructor TextTrack: TextTrackConstructor TextTrackCue: TextTrackCueConstructor TextTrackCueList: TextTrackCueListConstructor TextTrackList: TextTrackListConstructor TrackEvent: TrackEventConstructor webkitNotifications: NotificationCenter

Jonathan Stark is a mobile consultant and web evangelist who believes that wireless computing will transform every aspect of society.

Jonathan is the author of three books on mobile and web development, most notably O'Reilly's Building iPhone Apps with HTML, CSS, and JavaScript which is available in seven languages.

His Jonathan's Card experiment made international headlines by combining mobile payments with social giving to create a "pay it forward" coffee movement at Starbucks locations all over the U.S.

See Jonathan in person, check out his blog, listen to his podcast (co-hosted with the incomparable @kellishaver), join the mailing list, or connect online: