Implement OCSP stapling in Windows BoringSSL port.
[chromium-blink-merge.git] / third_party / polymer / components-chromium / core-transition / core-transition-extracted.js
blobe509dd2b21968ad3584656b5527c771e6577b6be
2 Polymer('core-transition', {
4 type: 'transition',
6 /**
7 * Run the animation.
9 * @method go
10 * @param {Node} node The node to apply the animation on
11 * @param {Object} state State info
13 go: function(node, state) {
14 this.complete(node);
17 /**
18 * Set up the animation. This may include injecting a stylesheet,
19 * applying styles, creating a web animations object, etc.. This
21 * @method setup
22 * @param {Node} node The animated node
24 setup: function(node) {
27 /**
28 * Tear down the animation.
30 * @method teardown
31 * @param {Node} node The animated node
33 teardown: function(node) {
36 /**
37 * Called when the animation completes. This function also fires the
38 * `core-transitionend` event.
40 * @method complete
41 * @param {Node} node The animated node
43 complete: function(node) {
44 this.fire('core-transitionend', null, node);
47 /**
48 * Utility function to listen to an event on a node once.
50 * @method listenOnce
51 * @param {Node} node The animated node
52 * @param {string} event Name of an event
53 * @param {Function} fn Event handler
54 * @param {Array} args Additional arguments to pass to `fn`
56 listenOnce: function(node, event, fn, args) {
57 var self = this;
58 var listener = function() {
59 fn.apply(self, args);
60 node.removeEventListener(event, listener, false);
62 node.addEventListener(event, listener, false);
65 });