1/** 2 * JIRA's module for using [Skate.js]{@link https://github.com/skatejs/skatejs} in JIRA's UI. 3 * 4 * Skate is a lightweight polyfill for creating Custom Elements. 5 * Skate is JIRA's conduit to creating web-components. 6 * 7 * Imports the Skate module from [the Atlassian JSLibs plugin]{@link https://stash.atlassian.com/projects/CP/repos/atlassian-jslibs} 8 * 9 * @module jira/skate 10 */ 11define('jira/skate', ['atlassian/libs/skate-0.12.6'], function(skate) { 12 function jiraSkate(id, component) { 13 return skate(id, component); 14 } 15 16 jiraSkate.type = skate.type || { 17 CLASSNAME: skate.types.CLASS, 18 ELEMENT: skate.types.TAG, 19 ATTRIBUTE: skate.types.ATTR 20 }; 21 22 jiraSkate.init = function(nodes) { 23 skate.init(nodes); 24 // Since each version of Skate keeps its own registry of components, 25 // it's possible that there's a global version of Skate, and it's 26 // maintaining its own distinct list of components to us. 27 // 28 // A tangible scenario is AUI's internal Skate instance. 29 // 30 // Proxying to the window skate is an approximation of 31 // synchronously initialising AUI's components. 32 if (window.skate && window.skate.init) { 33 // Prevent accidental infinite recursion if somebody 34 // unintentionally puts this module in to the global namespace; 35 // Avoids issues like NEXT-627. 36 if (window.skate.init !== jiraSkate.init) { 37 window.skate.init(nodes); 38 } 39 } 40 return nodes; 41 }; 42 43 return jiraSkate; 44});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.