Liferay DXP JavaScript Utilities

This tutorial explains some of the utility methods and objects inside the Liferay global JavaScript object.

Liferay Browser

The Liferay.Browser object contains methods that expose the current user agent characteristics without the need of accessing and parsing the global window.navigator object.

The available methods for the Liferay.Browser object are listed in the table below:

MethodReturn TypeDescription
acceptsGzipbooleanReturns whether the browser accepts gzip file compression
getMajorVersionnumberReturns the major version of the browser
getRevisionnumberReturns the revision version of the browser
getVersionnumberReturns the major.minor version of the browser
isAirbooleanReturns whether the browser is Adobe AIR
isChromebooleanReturns whether the browser is Chrome
isFirefoxbooleanReturns whether the browser is Firefox
isGeckobooleanReturns whether the browser is Gecko
isIebooleanReturns whether the browser is Internet Explorer
isIphonebooleanReturns whether the browser is on an Iphone
isLinuxbooleanReturns whether the browser is being viewed on Linux
isMacbooleanReturns whether the browser is being viewed on Mac
isMobilebooleanReturns whether the browser is being viewed on a mobile device
isMozillabooleanReturns whether the browser is Mozilla
isOperabooleanReturns whether the browser is Opera
isRtfbooleanReturns whether the browser supports RTF
isSafaribooleanReturns whether the browser is Safari
isSunbooleanReturns whether the browser is being viewed on Sun OS
isWebKitbooleanReturns whether the browser is WebKit
isWindowsbooleanReturns whether the browser is being viewed on Windows

Accessing ThemeDisplay Information

« Working with URLs in JavaScriptInvoking Liferay Services »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 1