##// END OF EJS Templates
Merge pull request #11267 from gnestor/display-javascript...
Kyle Kelley -
r24484:ee2798c2 merge
parent child Browse files
Show More
@@ -852,18 +852,25 b' class JSON(DisplayObject):'
852 852 def _repr_json_(self):
853 853 return self._data_and_metadata()
854 854
855 _css_t = """$("head").append($("<link/>").attr({
856 rel: "stylesheet",
857 type: "text/css",
858 href: "%s"
859 }));
855 _css_t = """var link = document.createElement("link");
856 link.ref = "stylesheet";
857 link.type = "text/css";
858 link.href = "%s";
859 document.head.appendChild(link);
860 860 """
861 861
862 _lib_t1 = """$.getScript("%s", function () {
863 """
864 _lib_t2 = """});
862 _lib_t1 = """new Promise(function(resolve, reject) {
863 var script = document.createElement("script");
864 script.onload = resolve;
865 script.onerror = reject;
866 script.src = "%s";
867 document.head.appendChild(script);
868 }).then(() => {
865 869 """
866 870
871 _lib_t2 = """
872 });"""
873
867 874 class GeoJSON(JSON):
868 875 """GeoJSON expects JSON-able dict
869 876
General Comments 0
You need to be logged in to leave comments. Login now