gorhill/uBlock-for-firefox-legacy

TypeError in contentscript?

AroKol78 opened this issue · 2 comments

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:

this.xpr = this.xpe.evaluate(

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 worksblablabla.bla##:xpath(//a[not(contains(@href,','))][string-length(@href)>1600])
  • causes this error blablabla.bla##:xpath('//*[string-length(@href) > 1600]')