# SelectorQuery NodesRef.node(function callback)

Start from base library version 2.7.0. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support

Obtain Node Node instance.

# parameter

# function callback

Callback function, before executing SelectorQuery.exec Method, returns node information.

# parameter

# Object res
attribute type Introductions
node Object Node corresponding Node Example

# Return value

# SelectorQuery

# sample code

Page({
  getNode() {
    wx.createSelectorQuery().select('.canvas').node(function(res){
      console.log(res.node) // Node corresponding Canvas Instance.
    }).exec()
  }
})