##// END OF EJS Templates
Take jquery's getScript approach
Grant Nestor -
Show More
@@ -859,16 +859,17 b' _css_t = """var link = document.createElement("link");'
859 document.head.appendChild(link);
859 document.head.appendChild(link);
860 """
860 """
861
861
862 _lib_t1 = """var script = document.createElement("script");
862 _lib_t1 = """new Promise(function(resolve, reject) {
863 script.type = "text/javascript";
863 var script = document.createElement("script");
864 script.onload = resolve;
865 script.onerror = reject;
864 script.src = "%s";
866 script.src = "%s";
865 script.onload = script.onreadystatechange = function() {
867 document.head.appendChild(script);
866 if (!this.readyState || this.readyState == 'complete') {
868 }).then(() => {
867 """
869 """
868
870
869 _lib_t2 = """}
871 _lib_t2 = """
870 };
872 });"""
871 document.head.appendChild(script);"""
872
873
873 class GeoJSON(JSON):
874 class GeoJSON(JSON):
874 """GeoJSON expects JSON-able dict
875 """GeoJSON expects JSON-able dict
General Comments 0
You need to be logged in to leave comments. Login now