gpt4 book ai didi

javascript - 为什么 "typeof SVGElement.prototype.getBBox"是 "undefined"?

转载 作者:太空宇宙 更新时间:2023-11-04 15:53:37 25 4
gpt4 key购买 nike

我在代码中使用.getBBox()并且它工作正常,但是当我尝试时

typeof SVGElement.prototype.getBBox  

它返回“未定义”
为什么会这样?

最佳答案

因为 getBBox 并未在所有 SVG 元素上定义,它仅在实现 SVGLocatable 的元素上定义。界面。

关于javascript - 为什么 "typeof SVGElement.prototype.getBBox"是 "undefined"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42898367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com