Skip to content

Commit

Permalink
Fixes #4553, #4554
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Apr 21, 2017
1 parent 053ac15 commit 36792f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 6 additions & 4 deletions lib/elements/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@

/**
* The name of the variable to add to the binding scope with the index
* for the inst. If `sort` is provided, the index will reflect the
* sorted order (rather than the original array order).
* of the instance in the sorted and filtered list of rendered items.
* Note, for the index in the `this.items` array, use the value of the
* `itemsIndexAs` property.
*/
indexAs: {
type: String,
Expand All @@ -167,8 +168,9 @@

/**
* The name of the variable to add to the binding scope with the index
* for the inst. If `sort` is provided, the index will reflect the
* sorted order (rather than the original array order).
* of the instance in the `this.items` array. Note, for the index of
* this instance in the sorted and filtered list of rendered items,
* use the value of the `indexAs` property.
*/
itemsIndexAs: {
type: String,
Expand Down
14 changes: 13 additions & 1 deletion lib/utils/debounce.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,19 @@
}
/**
* Creates a debouncer if no debouncer is passed as a parameter
* or it cancels an active debouncer otherwise.
* or it cancels an active debouncer otherwise. For example, the following
* code can be called multiple times within a microtask and the provided
* function will be debounced (called once at the next microtask checkpoint):
*
* let job = Polymer.Debouncer.debounce(job, Polymer.Async.microTask, () => {
* console.log('debounced!');
* });
*
* Note: In testing it is often convenient to avoid asynchrony. To accomplish
* this with a debouncer, you can use `Polymer.enqueueDebouncer` and
* `Polymer.flush`. For example, extend the above example by adding
* `Polymer.enqueueDebouncer(job)`. Then in a test, call `Polymer.flush` to
* ensure the debouncer has completed.
*
* @param {Polymer.Debouncer?} debouncer Debouncer object.
* @param {!AsyncModule} asyncModule Object with Async interface
Expand Down

0 comments on commit 36792f9

Please sign in to comment.