We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
抱歉,这个问题本来应该报告给百度地图,但是我怀疑百度的工单客服可能是个机器人,不得已发到了这里,希望可以帮忙反馈一下
由于百度地图 JSAPI 中错误的实现并覆盖了原生浏览器的 HTMLElement#contains 方法,导致其他库中使用该方法并传入值为null 的参数时报错
HTMLElement#contains
null
document.querySelector('div').contains(null);
控制台中应返回结果 false
false
这是在百度搜索中调用的结果(没有引入百度地图JSAPI)
控制台出现错误信息 Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
这是在百度地图中调用的结果(引入了百度地图JSAPI)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
抱歉,这个问题本来应该报告给百度地图,但是我怀疑百度的工单客服可能是个机器人,不得已发到了这里,希望可以帮忙反馈一下
描述
由于百度地图 JSAPI 中错误的实现并覆盖了原生浏览器的
HTMLElement#contains
方法,导致其他库中使用该方法并传入值为null
的参数时报错复现步骤
document.querySelector('div').contains(null);
并执行期望的结果
控制台中应返回结果
false
这是在百度搜索中调用的结果(没有引入百度地图JSAPI)
实际结果
控制台出现错误信息
Uncaught TypeError: Cannot read properties of null (reading 'parentNode')
这是在百度地图中调用的结果(引入了百度地图JSAPI)
The text was updated successfully, but these errors were encountered: