 # a terminal.
 #
 
+ELEMENTS = []
+ELEMENTS.push Element if Element?
+ELEMENTS.push HTMLElement if HTMLElement?
+ELEMENTS.push XULElement if XULElement?
+
 inspect = (object, showHidden=off, depth=2, opts={}) ->
   opts.color    ?= off
   opts.sanitize ?= type.isTainted object

    inspectArray object, showHidden, depth, opts
  else if classForInspect is RegExp or type.isRegExp object
    inspectRegExp object, opts
  else if classForInspect in [Element?, HTMLElement?, XULElement?] or (Element? and type.is object, Element)
    inspectElement object, opts
  else if classForInspect is Number or typeof object is 'number'
    inspectNumber object, opts

  return style 'shell', object.toString(), opts if depth < 0

  # allow the object to override the thing we display as its content
  hasContentForInspect = object.contentForInspect?
  content = if hasContentForInspect
              object.contentForInspect()
            else
              object


  if not hasContentForInspect or content?.constructor?.name is 'Object'
    # simple objects just get enumerated properties
    properties = for own k of content
      getter = content.__lookupGetter__? k
      setter = content.__lookupSetter__? k
