DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
  • Infrastructure
    • can-construct
    • can-control
    • can-event
    • can-event/async/async
    • can-event/batch/batch
    • can-observation
    • can-simple-map
    • can-util
    • can-view-callbacks
      • types
        • attrData
        • tagData
      • methods
        • attr
        • tag
    • can-view-live
    • can-view-model
    • can-view-nodelist
    • can-view-parser
    • can-view-scope
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-view-callbacks
  • /
  • attrData
  • / On this page
    • attrData

      typedef

      The data provided to attr.

      • source

      Object

      var canViewCallbacks = require("can-view-callbacks");
      var stache = require("can-stache");
      
      canViewCallbacks.attr("my-attr", function(el, attrData){
        attrData.scope.peak("value") //-> 123
        attrData.attributeName       //-> "my-attr"
      
      });
      
      stache("<div my-attr='value'/>")({
          value: 123
      });
      

      Options

      • scope {can-view-scope}:

        The scope of the element.

      • options {Options}:

        The mustache helpers and other non-data values passed to the template.

      • attributeName {String}:

        The attribute name that was matched.

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