utils/env
@ckeditor/ckeditor5-utils/src/env
Filtering
Constants
-
A namespace containing environment and browser information.
Interfaces
-
EnvFeaturesType
module:utils/env~EnvFeaturesType
-
EnvType
module:utils/env~EnvType
Functions
-
getUserAgent() → string
module:utils/env~getUserAgent
Safely returns
userAgent
from browser's navigator API in a lower case. If navigator API is not available it will return an empty string.Returns
string
-
isAndroid( userAgent ) → boolean
module:utils/env~isAndroid
Checks if User Agent represented by the string is Android mobile device.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is Safari or not.
-
isBlink( userAgent ) → boolean
module:utils/env~isBlink
Checks if User Agent represented by the string is Blink engine.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is Blink engine or not.
-
isGecko( userAgent ) → boolean
module:utils/env~isGecko
Checks if User Agent represented by the string is Firefox (Gecko).
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is Firefox or not.
-
isMac( userAgent ) → boolean
module:utils/env~isMac
Checks if User Agent represented by the string is running on Macintosh.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is running on Macintosh or not.
-
isMediaForcedColors() → boolean
module:utils/env~isMediaForcedColors
Checks if the user agent has enabled a forced colors mode (e.g. Windows High Contrast mode).
Returns
false
in environments wherewindow
global object is not available.Returns
boolean
-
isMotionReduced() → boolean
module:utils/env~isMotionReduced
Checks if the user enabled "prefers reduced motion" setting in browser.
Returns
false
in environments wherewindow
global object is not available.Returns
boolean
-
isRegExpUnicodePropertySupported() → boolean
module:utils/env~isRegExpUnicodePropertySupported
Checks if the current environment supports ES2018 Unicode properties like
\p{P}
or\p{L}
. More information about unicode properties might be found in Unicode Standard Annex #44.Returns
boolean
-
isSafari( userAgent ) → boolean
module:utils/env~isSafari
Checks if User Agent represented by the string is Safari.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is Safari or not.
-
isWindows( userAgent ) → boolean
module:utils/env~isWindows
Checks if User Agent represented by the string is running on Windows.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is running on Windows or not.
-
isiOS( userAgent ) → boolean
module:utils/env~isiOS
Checks if User Agent represented by the string is running in iOS.
Parameters
userAgent : string
Lowercase
navigator.userAgent
string.
Returns
boolean
Whether User Agent is running in iOS or not.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.