happy-dom
Advanced tools
Comparing version 14.0.0 to 14.1.0
@@ -15,2 +15,4 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.cjs'; | ||
disableComputedStyleRendering: boolean; | ||
/** Handle disabled resource loading as success */ | ||
handleDisabledFileLoadingAsSuccess: boolean; | ||
/** | ||
@@ -17,0 +19,0 @@ * Disables error capturing. |
@@ -12,2 +12,4 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.cjs'; | ||
disableComputedStyleRendering?: boolean; | ||
/** Handle disabled file loading as success */ | ||
handleDisabledFileLoadingAsSuccess?: boolean; | ||
/** | ||
@@ -14,0 +16,0 @@ * Disables error capturing. |
@@ -15,2 +15,4 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.js'; | ||
disableComputedStyleRendering: boolean; | ||
/** Handle disabled resource loading as success */ | ||
handleDisabledFileLoadingAsSuccess: boolean; | ||
/** | ||
@@ -17,0 +19,0 @@ * Disables error capturing. |
@@ -12,2 +12,4 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.js'; | ||
disableComputedStyleRendering?: boolean; | ||
/** Handle disabled file loading as success */ | ||
handleDisabledFileLoadingAsSuccess?: boolean; | ||
/** | ||
@@ -14,0 +16,0 @@ * Disables error capturing. |
@@ -64,3 +64,8 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
if (browserSettings.disableCSSFileLoading) { | ||
WindowErrorUtility.dispatchError(element, new DOMException(`Failed to load external stylesheet "${absoluteURL}". CSS file loading is disabled.`, DOMExceptionNameEnum.notSupportedError)); | ||
if (browserSettings.handleDisabledFileLoadingAsSuccess) { | ||
element.dispatchEvent(new Event('load')); | ||
} | ||
else { | ||
WindowErrorUtility.dispatchError(element, new DOMException(`Failed to load external stylesheet "${absoluteURL}". CSS file loading is disabled.`, DOMExceptionNameEnum.notSupportedError)); | ||
} | ||
return; | ||
@@ -67,0 +72,0 @@ } |
@@ -62,3 +62,8 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
browserSettings.disableJavaScriptEvaluation) { | ||
WindowErrorUtility.dispatchError(element, new DOMException(`Failed to load external script "${absoluteURL}". JavaScript file loading is disabled.`, DOMExceptionNameEnum.notSupportedError)); | ||
if (browserSettings.handleDisabledFileLoadingAsSuccess) { | ||
element.dispatchEvent(new Event('load')); | ||
} | ||
else { | ||
WindowErrorUtility.dispatchError(element, new DOMException(`Failed to load external script "${absoluteURL}". JavaScript file loading is disabled.`, DOMExceptionNameEnum.notSupportedError)); | ||
} | ||
return; | ||
@@ -65,0 +70,0 @@ } |
{ | ||
"name": "happy-dom", | ||
"version": "14.0.0", | ||
"version": "14.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom", |
@@ -20,2 +20,5 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.js'; | ||
/** Handle disabled resource loading as success */ | ||
handleDisabledFileLoadingAsSuccess: boolean; | ||
/** | ||
@@ -22,0 +25,0 @@ * Disables error capturing. |
@@ -17,2 +17,5 @@ import BrowserErrorCaptureEnum from '../enums/BrowserErrorCaptureEnum.js'; | ||
/** Handle disabled file loading as success */ | ||
handleDisabledFileLoadingAsSuccess?: boolean; | ||
/** | ||
@@ -19,0 +22,0 @@ * Disables error capturing. |
@@ -66,9 +66,13 @@ import Event from '../../event/Event.js'; | ||
if (browserSettings.disableCSSFileLoading) { | ||
WindowErrorUtility.dispatchError( | ||
element, | ||
new DOMException( | ||
`Failed to load external stylesheet "${absoluteURL}". CSS file loading is disabled.`, | ||
DOMExceptionNameEnum.notSupportedError | ||
) | ||
); | ||
if (browserSettings.handleDisabledFileLoadingAsSuccess) { | ||
element.dispatchEvent(new Event('load')); | ||
} else { | ||
WindowErrorUtility.dispatchError( | ||
element, | ||
new DOMException( | ||
`Failed to load external stylesheet "${absoluteURL}". CSS file loading is disabled.`, | ||
DOMExceptionNameEnum.notSupportedError | ||
) | ||
); | ||
} | ||
return; | ||
@@ -75,0 +79,0 @@ } |
@@ -64,9 +64,13 @@ import Event from '../../event/Event.js'; | ||
) { | ||
WindowErrorUtility.dispatchError( | ||
element, | ||
new DOMException( | ||
`Failed to load external script "${absoluteURL}". JavaScript file loading is disabled.`, | ||
DOMExceptionNameEnum.notSupportedError | ||
) | ||
); | ||
if (browserSettings.handleDisabledFileLoadingAsSuccess) { | ||
element.dispatchEvent(new Event('load')); | ||
} else { | ||
WindowErrorUtility.dispatchError( | ||
element, | ||
new DOMException( | ||
`Failed to load external script "${absoluteURL}". JavaScript file loading is disabled.`, | ||
DOMExceptionNameEnum.notSupportedError | ||
) | ||
); | ||
} | ||
return; | ||
@@ -73,0 +77,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8165781
163770