class method Element.inspect

View source on GitHub →

Element.inspect(element) → String

Returns the debug-oriented string representation of element.

For more information on inspect methods, see Object.inspect.

  <li id="golden-delicious">Golden Delicious</li>
  <li id="mutsu" class="yummy apple">Mutsu</li>
  <li id="mcintosh" class="yummy">McIntosh</li>

And the associated JavaScript:

// -> '<li id="golden-delicious">'
// -> '<li id="mutsu" class="yummy apple">'
// -> '<li>'

This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.