@tririga/tri-template
Version:
A simple tool for generating IBM TRIRIGA UX view skeletons from available templates.
32 lines (31 loc) • 899 B
HTML
<!--
@license
IBM Confidential - OCO Source Materials - (C) COPYRIGHT IBM CORP. 2017 - The source code for this program is not published or otherwise divested of its trade secrets, irrespective of what has been deposited with the U.S. Copyright Office.
-->
<link rel="import" href="../polymer/polymer.html">
<script>
/**
* `TriAppLazyLoadingBehavior` is a utility for lazy-loading resources.
*
* @polymerBehavior
*/
TriAppLazyLoadingBehavior = {
loadResource: function(resourceInstance, resourceFilename) {
return new Promise(function(resolve) {
if (!Polymer.isInstance(resourceInstance)) {
this.importHref(this.resolveUrl(resourceFilename),
function() {
resolve();
},
function() {
console.error("Error loading " + resourceFilename + ".");
},
false
);
} else {
resolve();
}
}.bind(this));
},
};
</script>