happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
33 lines (31 loc) • 1.17 kB
text/typescript
import PackageVersion from '../version.js';
import BrowserErrorCaptureEnum from './enums/BrowserErrorCaptureEnum.js';
import BrowserNavigationCrossOriginPolicyEnum from './enums/BrowserNavigationCrossOriginPolicyEnum.js';
import IBrowserSettings from './types/IBrowserSettings.js';
export default <IBrowserSettings>{
disableJavaScriptEvaluation: false,
disableJavaScriptFileLoading: false,
disableCSSFileLoading: false,
disableIframePageLoading: false,
disableComputedStyleRendering: false,
disableErrorCapturing: false,
errorCapture: BrowserErrorCaptureEnum.tryAndCatch,
enableFileSystemHttpRequests: false,
navigation: {
disableMainFrameNavigation: false,
disableChildFrameNavigation: false,
disableChildPageNavigation: false,
disableFallbackToSetURL: false,
crossOriginPolicy: BrowserNavigationCrossOriginPolicyEnum.anyOrigin
},
navigator: {
userAgent: `Mozilla/5.0 (X11; ${
process.platform.charAt(0).toUpperCase() + process.platform.slice(1) + ' ' + process.arch
}) AppleWebKit/537.36 (KHTML, like Gecko) HappyDOM/${PackageVersion.version}`,
maxTouchPoints: 0
},
device: {
prefersColorScheme: 'light',
mediaType: 'screen'
}
};