please support document.querySelector('form *:has(> textarea)')
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
People
(Reporter: yjbrowserjyt, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
I have found that some websites use document.querySelector('form *:has(> textarea)'), which results in a SyntaxError
in Firefox, stating, "Document.querySelector: 'form *:has(> textarea)' is not a valid selector."
Please assist in enabling this syntax.
Actual results:
SyntaxError: Document.querySelector: 'form *:has(> textarea)' is not a valid selector
Updated•1 year ago
|
Comment 1•1 year ago
|
||
The :has() pseudo-class is currently only enabled in Nightly build.
Comment 2•1 year ago
|
||
(In reply to jian from comment #0)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
I have found that some websites use document.querySelector('form *:has(> textarea)'), which results in a
SyntaxError
in Firefox, stating, "Document.querySelector: 'form *:has(> textarea)' is not a valid selector."Please assist in enabling this syntax.
Actual results:
SyntaxError: Document.querySelector: 'form *:has(> textarea)' is not a valid selector
jian, can you tell us which website it is?
I lost the webpage, but I built a test page. When I click on "loadjs" Chrome can execute it normally, but Firefox cannot run it.
(In reply to Nicolas Chevobbe [:nchevobbe] [on PTO, back October 23] from comment #2)
(In reply to jian from comment #0)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
I have found that some websites use document.querySelector('form *:has(> textarea)'), which results in a
SyntaxError
in Firefox, stating, "Document.querySelector: 'form *:has(> textarea)' is not a valid selector."Please assist in enabling this syntax.
Actual results:
SyntaxError: Document.querySelector: 'form *:has(> textarea)' is not a valid selector
jian, can you tell us which website it is?
I lost the webpage, but I built a test page. When I click on "loadjs" Chrome can execute it normally, but Firefox cannot run it.
Comment 5•1 year ago
|
||
Thanks for the testcase!
That page works on Nightly 119 on - On release 119, it's behind the pref layout.css.has-selector.enabled
.
Work to enable on default is being tracked in bug 1858743.
Description
•