3 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 * Code distributed by Google as part of the polymer project is also
8 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
12 global.flushAsynchronousOperations = function() {
15 // force lifecycle callback to fire on polyfill
16 window.CustomElements && window.CustomElements.takeRecords();
19 global.forceXIfStamp = function(node) {
20 var templates = Polymer.dom(node.root).querySelectorAll('template[is=dom-if]');
21 for (var tmpl, i = 0; tmpl = templates[i]; i++) {
25 global.flushAsynchronousOperations();
28 global.fireEvent = function(type, props, node) {
29 var event = new CustomEvent(type, {
36 node.dispatchEvent(event);