Abhishek Jain
Abhishek Jain

Reputation: 45

what is dojo equivalent of jquery's $(this) or $(JavaScript object)?

$(this) or $(JavaScript object) returns a javascript object wrapped in jquery object, hence making it a jquery object, which gives it additional functionalities?

What is its dojo's equivalent

Upvotes: 0

Views: 92

Answers (1)

Dimitri Mestdagh
Dimitri Mestdagh

Reputation: 44665

Dojo doesn't have a wrapper for objects as far as I know of. It has a wrapper for DOM nodes:

require([ "dojo/query" ], function(query) {
    query(document.getElementById("test")); // Adds extra features
});

You can then add extra features by importing one of these modules:

  • dojo/NodeList-dom
  • dojo/NodeList-data
  • dojo/NodeList-traverse
  • dojo/NodeList-manipulate
  • dojo/NodeList-fx
  • dojo/NodeList-html

There are probably equivalents in Dojo for the additional functionalities you want, but then you will have to give more information about which functionalities you really need.

Upvotes: 1

Related Questions