-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(regression) TypeError: Cannot set property loading of [object Object] which has only a getter #1218
Comments
looks like #655 had the same error. I also encountered this issue while trying to assign loading='lazy' to HTMLImageElement like so: import { Window } from 'happy-dom'
const window = new Window()
const document = window.document
document.body.innerHTML = '<img>'
const $0 = document.getElementsByTagName('img')[0]
$0.loading = 'lazy'
console.log($0.loading) // 'auto' It only has getter defined here unlike other properties, which also have setters. |
Yeah and the problem only appeared after #1209 |
…annot-set-property-loading-of-object-object-which-has-only-a-getter fix: [#1218] Adds missing setter for the HTMLImageElement.loading pro…
Thank you for reporting @Yberion and @notTGY! 🙂 There is a fix in now: |
Hello @capricorn86, thanks a lot for the fix, I can confirm it fixed my problem! |
Describe the bug
Hello, on my Angular application I'm using this lib https://github.com/justinribeiro/lite-youtube.
When testing a component that uses this lib with
Vitest
(I import the lib in the test setup) andhappy-dom
, on versions before13.1.0
I had no problem rendering the Angular component on happy-dom.Since
13.1.0
I'm getting the following error:The path to the code:
TS
JS
lite-youtube.js
I think the regression is related to:
Expected behavior
No error as before and on the browser.
The text was updated successfully, but these errors were encountered: