Skip to content
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

"Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" #481

Open
javanoclaw opened this issue Nov 2, 2023 · 1 comment

Comments

@javanoclaw
Copy link

I found some compatibility issues in Firefox browser.

Environment
Browser: Firefox 60.7.0esr (64 bit)
Browser download link: ftp.mozilla.org/pub/firefox/releases/60.7.0esr/

I try use these codes to fix this issues:

var _getComputedStyle = getComputedStyle(target, '::-webkit-scrollbar');
var width = '0px';
var height = '0px';
try {
    width = _getComputedStyle.width,
    height = _getComputedStyle.height;
}catch(e) {
    width = '0px';
    height = '0px';
}

Can these codes be merged into the master branch?

@zhenghangjie
Copy link

getComputedStyle(document.body, '::-webkit-scrollbar');

  1. 这个伪类 ::-webkit-scrollbar 在 Firefox 上不支持(非标)
  2. 在 Firefox 62 之前,视窗上未展示的元素(Window with no presentation) getComputedStyle 返回的是 null

所以出现这种声明了要匹配的伪元素的字符串反而被浏览器识别为元素不存在,返回了 null
https://bugzilla.mozilla.org/show_bug.cgi?id=1467722
https://bugzilla.mozilla.org/show_bug.cgi?id=1471231

image image

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