Files
gerrit/polygerrit-ui/app/test/common-test-setup.js
Tao Zhou 84f0797804 Switch from Polymer 1 to Polymer 2
Bug: Issue 4699
Change-Id: Ie6ba626a79eeef05798c23228ce7cff94a45e0a0
2019-10-15 13:52:17 +02:00

29 lines
1008 B
JavaScript

/**
* @license
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
window.POLYMER2 = true;
/**
* Helps looking up the proper iron-input element during the Polymer 2
* transition. Polymer 2 uses the <iron-input> element, while Polymer 1 uses
* the nested <input is="iron-input"> element.
*/
window.ironInput = function(element) {
return Polymer.dom(element).querySelector(
Polymer.Element ? 'iron-input' : 'input[is=iron-input]');
};