Last active
December 8, 2017 20:03
-
-
Save Scarygami/a5def45785ceeeadbe10 to your computer and use it in GitHub Desktop.
Polymer debounce sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Polymer({ | |
is: 'with-debounce', | |
properties: { | |
property1: { | |
type: String, | |
observer: '_doSomething' | |
}, | |
property2: { | |
type: String, | |
observer: '_doSomething' | |
}, | |
}, | |
_doSomething: function () { | |
this.debounce('doSomething', function () { | |
console.log('with-debounce needs to do something...'); | |
}, 300); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Polymer({ | |
is: 'without-debounce', | |
properties: { | |
property1: { | |
type: String, | |
observer: '_doSomething' | |
}, | |
property2: { | |
type: String, | |
observer: '_doSomething' | |
}, | |
}, | |
_doSomething: function () { | |
console.log('without-debounce needs to do something...'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment