I am trying for using Ext.dom.Query.Select
method to find all divs which having class name square and highlightedReactangle.Same method was working with extjs 4
, but after up grading to extjs 5
it start throwing error.
Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': 'div:any(div.square|div.highlightedReactangle|div.highlightedReactangleIE|div.pin|div.redCircleCount|div.stampPreviewCls)' is not a valid selector.
The statement I'm using to find related div is,
this.el.select("div:any(div.square|div.highlightedReactangle|div.highlightedReactangleIE|div.pin|div.redCircleCount|div.stampPreviewCls)", true);
what exactely I'm missing ?
From version 5, when
select
is called onElement
(versus explicitly usingExt.dom.Query.select
), Ext JS uses the nativequerySelectorAll
method which requires valid CSS selectors. As the error message suggests, your selector is not a valid one.In version 4, Ext JS used
Ext.dom.Query.select
for processingselect
calls onElement
s. That method is more "liberal" thanquerySelectorAll
. It will work in version 5 as well, so you can just use: