Skip to content

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

Closed

Description

@cogic

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

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

Activity

  1. ruanyf commented on Apr 24, 2024

    @ruanyf
    Contributor

    谢谢指出,已经更正。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions