DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
      • computeSettings
      • compute
        • methods
          • addEventListener
          • off
          • on
          • removeEventListener
        • events
          • change
    • can-connect
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-compute
  • /
  • compute
  • /
  • removeEventListener
  • / On this page
    • removeEventListener

      function

      Listen to when a compute changes value.

      • source

      compute.removeEventListener(eventType, handler)

      var age = compute(33);
      
      age.removeEventListener('change', function(ev, newVal, oldVal){
          ev //-> {type: "change", batchNum: 5}
          newVal //-> 34
          oldVal //-> 33
      });
      
      age(34);
      

      Parameters

      1. eventType {String}:

        The name of the event to bind on, usually change.

      2. handler {function(event, args...)}:

        The handler to be called when this type of event fires.

      Returns

      {compute(newVal)}:

      The compute instance.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.