window.navigator 프로퍼티는 Navigator 객체에 대한 참조로서 브라우저에 관한 정보를 담고 있다.
다음 예제는 navigator 객체의 프로퍼티를 보여준다.
for (var name in navigator){ console.log(name + ": " + navigator[name]); }
파이어폭스 브라우저에서 실행한 결과는 다음과 같다.
appCodeName: Mozilla appName: Netscape appVersion: 5.0 (Windows) language: en-US mimeTypes: [object MimeTypeArray] platform: Win32 oscpu: Windows NT 6.1; WOW64 vendor: vendorSub: product: Gecko productSub: 20100101 plugins: [object PluginArray] userAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0 cookieEnabled: true onLine: true buildID: 20130409194949 doNotTrack: unspecified mozPower: null javaEnabled: function javaEnabled() { [native code] } taintEnabled: function taintEnabled() { [native code] } vibrate: function vibrate() { [native code] } addIdleObserver: function addIdleObserver() { [native code] } removeIdleObserver: function removeIdleObserver() { [native code] } requestWakeLock: function requestWakeLock() { [native code] } getDeviceStorage: function getDeviceStorage() { [native code] } geolocation: [object GeoGeolocation] registerContentHandler: function registerContentHandler() { [native code] } registerProtocolHandler: function registerProtocolHandler() { [native code] } mozIsLocallyAvailable: function mozIsLocallyAvailable() { [native code] } battery: [object BatteryManager] mozSms: null mozGetUserMediaDevices: function mozGetUserMediaDevices() { [native code] } mozGetUserMedia: function mozGetUserMedia() { [native code] } mozConnection: [object MozConnection] mozCameras: null
← 이전 | 홈 | 다음 → |