DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
    • can-construct-super
    • can-define-stream
    • can-fixture
    • can-fixture-socket
    • can-jquery
    • can-stache-converters
    • can-stream
    • can-vdom
    • can-view-import
    • can-zone
      • types
        • ZoneSpec
        • makeZoneSpec
      • static
        • current
        • error
        • ignore
        • waitFor
      • prototype
        • addWait
        • data
        • removeWait
        • run
      • plugins
        • ./debug
        • ./timeout
      • modules
        • ./register
    • steal-stache
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Ecosystem
  • /
  • can-zone
  • /
  • data
  • / On this page
    • data

      property
      • source

      zone.data

      You might want to get data back from can-zone, for example if you are using the library to track asynchronous rendering requests. Each zone contains a data object which can be used to store artibitrary values.

      var Zone = require("can-zone");
      
      var xhr = new XMLHttpRequest();
      xhr.open("GET", "http://example.com");
      xhr.onload = function(){
          // Save this data for later
          Zone.current.data.xhr = xhr.responseText;
      };
      xhr.send();
      

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