# SelectorQuery.in

Call SelectorQuery.in(object component) to change the selection range of the selector to within the custom component `component` (initially, the selector only selects nodes in the page range and will not select any nodes in the custom component).

## Support

This API only supports gadget calls, and the corresponding client version support is as follows.

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | V2.2.0+ | V2.2.0+ | V2.2.0+ | V7.35.0+ | Preview
Web app | **X** | **X** | **X** | **X** | /

## Input

Name | Data type | Required | Default value | Description
---|---|---|---|---
component | object | Yes | \- | Custom component instance.

## Output

Name | Data type | Description
---|---|---
selectorQuery | object | See the [SelectorQuery](https://open.feishu.cn/document/uYjL24iN/uUjN24SN2YjL1YjN/selectorquery/selectorquery) instance.

##  Sample code

```js
Component({
  queryMultipleNodes (){
    const query = tt.createSelectorQuery().in(this)
    query.select('#the-id').boundingClientRect(function(res){
      res.top // The top coordinate value of the node in this component matching the #the-id selector
    }).exec()
  }
})
```

