• Jump To … +
    chaplin.coffee application.coffee composer.coffee controller.coffee dispatcher.coffee composition.coffee event_broker.coffee history.coffee route.coffee router.coffee support.coffee sync_machine.coffee utils.coffee mediator.coffee collection.coffee model.coffee collection_view.coffee layout.coffee view.coffee
  • support.coffee

  • ¶
    'use strict'
  • ¶

    Feature detection

  • ¶
    support =
  • ¶

    Test for defineProperty support (IE 8 knows the method but will throw an exception).

      propertyDescriptors: do ->
        unless typeof Object.defineProperty is 'function' and
        typeof Object.defineProperties is 'function'
          return false
        try
          o = {}
          Object.defineProperty o, 'foo', value: 'bar'
          return o.foo is 'bar'
        catch error
          return false
  • ¶

    Return our creation.

    module.exports = support