Skip to content

window.getComputedStyle() 方法返回的 CSSStyleDeclaration 实例的 cssText 属性值应为空字符串 #272

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

Closed
cogic opened this issue Apr 24, 2024 · 1 comment

Comments

@cogic
Copy link
Contributor

cogic commented Apr 24, 2024

老师好,在 dom/css.md 中的描述关于 window.getComputedStyle() 方法的描述”该方法返回的 CSSStyleDeclaration 实例的cssText属性无效,返回undefined“似乎有误,实际在浏览器中测试返回的应该是空字符串而不是 undefined。

在W3C中看到一处 change:CSSStyleDeclaration.cssText now returns the empty string for computed style.

@ruanyf ruanyf closed this as completed in 2092d3b Apr 24, 2024
@ruanyf
Copy link
Contributor

ruanyf commented Apr 24, 2024

谢谢指出,已经更正。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants