|
34 | 34 | <div class="banner clearfix" role="banner">
|
35 | 35 | <p class="title"><span><b>Epoxy</b>.js</span> Elegant Data Binding for Backbone</p>
|
36 | 36 | <div class="download">
|
37 |
| - <a href="js/backbone.epoxy.min.js" class="download-button">Download Epoxy 1.0.3</a> |
| 37 | + <a href="js/backbone.epoxy.min.js" class="download-button">Download Epoxy 1.0.5</a> |
38 | 38 | <p class="download-info">10k min, 2k gzip <i>|</i> <a href="https://github.com/gmac/backbone.epoxy">GitHub Full Source</a></p>
|
39 | 39 | </div>
|
40 | 40 | </div>
|
|
124 | 124 | <ul>
|
125 | 125 | <li><a href="#binding-add-filter">addFilter</a></li>
|
126 | 126 | <li><a href="#binding-add-handler">addHandler</a></li>
|
| 127 | + <li><a href="#binding-allowed-params">allowedParams</a></li> |
127 | 128 | <li><a href="#binding-config">config</a></li>
|
128 | 129 | <li><a href="#binding-empty-cache">emptyCache</a></li>
|
129 | 130 | </ul>
|
@@ -1094,7 +1095,24 @@ <h3 id="binding-add-handler">addHandler</h3>
|
1094 | 1095 | <li><tt>handler.clean()</tt> : <i>optional</i>. Called during handler disposal; offers a cleanup hook to remove any custom binding configuration as the handler is deprecated.</li>
|
1095 | 1096 | </ul>
|
1096 | 1097 | </div>
|
1097 |
| - |
| 1098 | + |
| 1099 | + <div class="section"> |
| 1100 | + <h3 id="binding-allowed-params">allowedParams</h3> |
| 1101 | + <code>Backbone.Epoxy.binding.allowedParams</code> |
| 1102 | + <p>A hash defining all non-handler attributes that are allowed within binding declarations. When validating bindings, Epoxy will throw an error for binding declarations that do not have a handler method or an <tt>allowedParams</tt> key. By default, <tt>allowedParams</tt> defines the following allowed keys:</p> |
| 1103 | + <ul> |
| 1104 | + <li><tt>events</tt></li> |
| 1105 | + <li><tt>optionsDefault</tt></li> |
| 1106 | + <li><tt>optionsEmpty</tt></li> |
| 1107 | + </ul> |
| 1108 | + |
| 1109 | + <p>If you define a custom binding handler that utilizes additional params within the binding declaration, then you must specifically add these additional parameter names into the <tt>allowedParams</tt> hash.</p> |
| 1110 | + |
| 1111 | +<pre><code class="js">Epoxy.binding.allowedParams.myCustomParam = true;</code></pre> |
| 1112 | + |
| 1113 | + <p>In the above example, Epoxy will no longer throw an error when it encounters a <tt>myCustomParam</tt> definition within a binding declaration.</p> |
| 1114 | + </div> |
| 1115 | + |
1098 | 1116 | <div class="section">
|
1099 | 1117 | <h3 id="binding-config">config</h3>
|
1100 | 1118 | <code>Backbone.Epoxy.binding.config( settings )</code>
|
|
0 commit comments