TypeError in contentscript?
AroKol78 opened this issue · 2 comments
AroKol78 commented
I get errors on some pages. Browser built on UXP.
error console:
Error: TypeError: The expression cannot be converted to return the specified type.
Source File: chrome://ublock0/content/js/contentscript.js
Line: 803
which indicates:
gwarser commented
Perhaps it's about Xpath expression?
https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression/evaluate#exceptions
AroKol78 commented
Thanks for a clarification. Looks like UXP issues.
thing for UXP developers
https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression/evaluate#exceptions
Error: TypeError: Not enough arguments to XPathEvaluator.createExpression.
Source File: https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/API/XPathExpression/evaluate/_sample_.examples.html
Line: 52
thing for uBO developers
weird
- does not cause this error and it works
blablabla.bla##:xpath(//a[not(contains(@href,','))][string-length(@href)>1600])
- causes this error
blablabla.bla##:xpath('//*[string-length(@href) > 1600]')