Skip to content

Commit

Permalink
Reduce __ spaz. Rename _addFeature.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 22, 2015
1 parent 607beb6 commit 5025e58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/lib/dom-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
flush: function() {
for (var i=0, host; i<dirtyRoots.length; i++) {
host = dirtyRoots[i];
host.flushDebouncer('__distribute');
host.flushDebouncer('_distribute');
}
dirtyRoots = [];
},
Expand All @@ -75,8 +75,8 @@
// TODO(sorvell): optimize debounce so it does less work by default
// and then remove these checks...
// need to dirty distribution once.
if (!host.isDebouncerActive('__distribute')) {
host.debounce('__distribute', host._distributeContent);
if (!host.isDebouncerActive('_distribute')) {
host.debounce('_distribute', host._distributeContent);
dirtyRoots.push(host);
}
},
Expand Down
14 changes: 7 additions & 7 deletions src/micro/debouncer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script>
Polymer.Base.addFeature({

Polymer.Base._addFeature({

_setupDebouncers: function() {
this._debouncers = {};
},

/**
* Debounce signals.
*
* Debounce signals.
*
* Call `debounce` to collapse multiple requests for a named task into
* one invocation which is made after the wait time has elapsed with
* one invocation which is made after the wait time has elapsed with
* no new request.
*
*
* debouncedClickAction: function(e) {
* // will not call `processClick` more than once per 100ms
* this.debounce('click', function() {
Expand All @@ -36,7 +36,7 @@
* @type Handle
*/
debounce: function(jobName, callback, wait) {
this._debouncers[jobName] = Polymer.Debounce.call(this,
this._debouncers[jobName] = Polymer.Debounce.call(this,
this._debouncers[jobName], callback, wait);
},

Expand Down

0 comments on commit 5025e58

Please sign in to comment.