Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<article class="content docs">
<section class='title'>
<div class='pullright'>
<ul class='tags'><li>function</li><li>static</li></ul>
<ul class='links'>
<li><a>source</a></li>
<li><a>download</a></li>
<li><a>tests</a></li>
</ul>
</div>
<h1>can.Control</h1>
<span class='module'>can/control.js</span>
<span class='inherits'>inherits: <a>can.Construct</a></span>
</section>
<section class='description'>
<p>Helps create organized, memory-leak free, rapidly performing, stateful controls. Use it to create UI controls like tabs, grids, and context menus, and organize them into higher-order business rules with can.route. It can serve as both a traditional view and a traditional controller.</p>
<ul class='contents'>
<li><a>new can.Control()</a></li>
<li><a>new can.Control(monkey)</a></li>
</ul>
</section>
<section class='signature'>
<h2>new can.Control(element, options) -> Object <span>since 1.0.2</span></h2>
<p>Constructor functions made with can.Construct are used to create objects with shared properties. It’s used by both can.Control and can.Model.</p>
<div class='parameters'>
<h3>Parameters</h3>
<div class='parameter'>
<h4>element</h4>
<div class='description'><p> the element for the control to be </p></div>
<ol class='options'>
<li class='option'>
<h5>monkey <code class='type'>{String | Object }</code></h5>
</li>
</ol>
</div>
</div>
</section>
<section class='comment'>
<h2>Creating a control</h2>
<p>Blah Blah</p>
</section>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.