flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Updated Map API with new classes and more functions.
Date Fri, 30 May 2014 20:42:55 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 2ea9912fb -> 26eadd3f2


Updated Map API with new classes and more functions.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/26eadd3f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/26eadd3f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/26eadd3f

Branch: refs/heads/develop
Commit: 26eadd3f23abd3217a21dfbba1a7dffa76c3b4d3
Parents: 2ea9912
Author: Peter Ent <pent@apache.org>
Authored: Fri May 30 16:42:38 2014 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Fri May 30 16:42:38 2014 -0400

----------------------------------------------------------------------
 .../src/org/apache/flex/maps/google/Geometry.as |  30 +++++
 .../src/org/apache/flex/maps/google/LatLng.as   |  30 +++++
 .../src/org/apache/flex/maps/google/Map.as      |   7 +
 .../src/org/apache/flex/maps/google/Place.as    |  43 ++++++
 .../apache/flex/maps/google/beads/MapView.as    | 104 +++++++++++----
 .../src/org/apache/flex/maps/google/Map.js      | 131 +++++++++++++++++--
 .../apache/flex/maps/google/beads/MapView.js    |  14 +-
 7 files changed, 316 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Geometry.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Geometry.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Geometry.as
new file mode 100644
index 0000000..4546bf0
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Geometry.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.maps.google
+{
+	public class Geometry
+	{
+		public function Geometry()
+		{
+			location = new LatLng();
+		}
+		
+		public var location:LatLng;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/LatLng.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/LatLng.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/LatLng.as
new file mode 100644
index 0000000..80e688c
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/LatLng.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.maps.google
+{
+	public class LatLng
+	{
+		public function LatLng()
+		{
+		}
+		
+		public var lat:Number;
+		public var lng:Number;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Map.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Map.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Map.as
index b379032..d0fb1a4 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Map.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Map.as
@@ -24,6 +24,11 @@ package org.apache.flex.maps.google
 	import org.apache.flex.maps.google.beads.MapView;
 	
 	[Event(name="ready", type="org.apache.flex.events.Event")]
+	[Event(name="centered", type="org.apache.flex.events.Event")]
+	[Event(name="boundsChanged", type="org.apache.flex.events.Event")]
+	[Event(name="zoomChanged", type="org.apache.flex.events.Event")]
+	[Event(name="dragEnd", type="org.apache.flex.events.Event")]
+	[Event(name="searchResult", type="org.apache.flex.events.Event")]
 	
 	/**
 	 *  The Map class displays a Google Map centered on lat/lng coordinates. The Map uses
@@ -73,6 +78,8 @@ package org.apache.flex.maps.google
 			return _token; 
 		}
 		
+		public var searchResults:Array;
+		
 		/**
 		 *  Loads a map centered on the given latitude and longitude coodinates at the
 		 *  zoom level provided.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Place.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Place.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Place.as
new file mode 100644
index 0000000..cb08703
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/Place.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.maps.google
+{
+	public class Place
+	{
+		public function Place()
+		{
+			geometry = new Geometry();
+		}
+		
+		public var geometry:Geometry;
+		public var icon:String;
+		public var id:String;
+		public var name:String;
+		public var reference:String;
+		public var vicinity:String;
+		
+		public function toString():String
+		{
+			var results:String = "";
+			if (name) results = name;
+			if (vicinity) results += " "+vicinity;
+			return results;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
index 324c367..d565355 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/maps/google/beads/MapView.as
@@ -25,8 +25,10 @@ package org.apache.flex.maps.google.beads
 	import org.apache.flex.core.IBeadView;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.maps.google.Map;
+	import org.apache.flex.maps.google.Place;
 	
 	/**
 	 *  The MapView bead class displays a Google Map using HTMLLoader.
@@ -85,10 +87,26 @@ package org.apache.flex.maps.google.beads
 			
 			if (page) {
 				_loader.loadString(page);
-				_loader.addEventListener(Event.COMPLETE, completeHandler);
-				IEventDispatcher(_strand).dispatchEvent(new Event("ready"));
+				_loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
 			}
 		}
+		
+		private function completeHandler(event:flash.events.Event):void
+		{
+			trace("htmlLoader complete");
+			
+			if (_loader && page) {
+				_loader.window.map.center_changed = onMapCentered;
+				_loader.window.map.bounds_changed = onMapBoundsChanged;
+				_loader.window.map.zoom_changed   = onMapZoomChanged;
+				_loader.window.map.dragend        = onMapDragEnd;
+				
+				// custom event handlers
+				_loader.window.addEventListener("searchResults",onSearchResults);
+			}
+			
+			IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
+		}
 				
 		private var page:String;
 		
@@ -134,8 +152,6 @@ package org.apache.flex.maps.google.beads
 		public function centerOnAddress(address:String):void
 		{
 			if (_loader && page) {
-				//_loader.window.addEventListener("mapCentered",onMapCentered);
-				_loader.window.map.center_changed = onMapCentered;
 				_loader.window.centeronaddress(address);
 			}
 		}
@@ -167,7 +183,6 @@ package org.apache.flex.maps.google.beads
 		public function nearbySearch(placeName:String):void
 		{
 			if (_loader && page) {
-				_loader.window.addEventListener("searchResults",onSearchResults);
 				_loader.window.nearbysearch(placeName);
 			}
 		}
@@ -205,7 +220,7 @@ package org.apache.flex.maps.google.beads
 		/**
 		 * @private
 		 */
-		private function handleSizeChange(event:Event):void
+		private function handleSizeChange(event:org.apache.flex.events.Event):void
 		{
 			_loader.width = UIBase(_strand).width;
 			_loader.height = UIBase(_strand).height;
@@ -216,7 +231,31 @@ package org.apache.flex.maps.google.beads
 		 */
 		private function onMapCentered():void
 		{
-			trace("The map has been centered");
+			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered")
);
+		}
+		
+		/**
+		 * @private
+		 */
+		private function onMapBoundsChanged():void
+		{
+			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged")
);
+		}
+		
+		/**
+		 * @private
+		 */
+		private function onMapZoomChanged():void
+		{
+			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("zoomChanged")
);
+		}
+		
+		/**
+		 * @private
+		 */
+		private function onMapDragEnd():void
+		{
+			IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
 		}
 		
 		/**
@@ -224,7 +263,21 @@ package org.apache.flex.maps.google.beads
 		 */
 		private function onSearchResults(event:*):void
 		{
-			trace("We have results");
+			var results:Array = [];
+			for(var i:int=0; i < event.results.length; i++) {
+				var result:Place = new Place();
+				result.geometry.location.lat = event.results[i].geometry.location.lat();
+				result.geometry.location.lng = event.results[i].geometry.location.lng();
+				result.icon = event.results[i].icon;
+				result.id = event.results[i].id;
+				result.name = event.results[i].name;
+				result.reference = event.results[i].reference;
+				result.vicinity = event.results[i].vicinity;
+				results.push(result);
+			}
+			
+			Map(_strand).searchResults = results;
+			IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("searchResult"));
 		}
 		
 		/**
@@ -253,13 +306,23 @@ package org.apache.flex.maps.google.beads
 			'      var service;' +
 			'      var places;' +
 			'      var markers;'+
-			'      function mapit(lat, lng, zoomLevel) {'+
-			'        var mapOptions = {'+
-			'          center: new google.maps.LatLng(lat, lng),'+
-			'          zoom: zoomLevel'+
-			'        };'+
-			'        map = new google.maps.Map(document.getElementById("map-canvas"),'+
-			'            mapOptions);'+
+			'      function mapit(lat, lng, zoomLevel) {' +
+			'        currentCenter = new google.maps.LatLng(lat, lng);'+
+			'        if (map == null) {' +
+			'            var mapOptions = {'+
+			'              center: currentCenter,'+
+			'              zoom: zoomLevel'+
+			'            };'+
+			'            map = new google.maps.Map(document.getElementById("map-canvas"),'+
+			'              mapOptions);' +
+			'        }' +
+			'        map.addEventListener("center_changed", function() {' +
+			'            currentCenter = map.getCenter();' +
+			'        });' +
+			'        map.addEventListener("bounds_changed", function() {' +
+			'            currentCenter = map.getCenter();' +
+			'        });' +
+			'        map.setCenter(currentCenter);'+
 			'      };'+
 			'      function codeaddress(address) {'+
 			'        if (!geocoder) geocoder = new google.maps.Geocoder();'+
@@ -318,27 +381,22 @@ package org.apache.flex.maps.google.beads
 			'                    markers.push(createMarker(place.geometry.location));' +
 			'                 }' +
 			'                 var event = document.createEvent("Event");' +
-			'                 event.results = markers;'+
+			'                 event.results = places;'+
             '                 event.initEvent("searchResults", true, true);' +
 			'                 window.dispatchEvent(event);' +
 			'              }' +
 			'          });'+
 			'      };'+
 			'      function initialize() {'+
-			'        mapit(-34.397, 150.644, 8);'+
+			'        mapit(37.333, -121.900, 12);'+
 			'      };'+
 			'      google.maps.event.addDomListener(window, "load", initialize);'+
 			'    </script>'+
 			'  </head>'+
 			'  <body>'+
-			'    <div id="map-canvas"/>'+
+			'    <div id="map-canvas"></div>'+
 			'  </body>'+
 			'</html>';
-		
-		private function completeHandler(event:Event):void
-		{
-			trace("htmlLoader complete");
-		}
 	}
 	
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Map.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Map.js b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Map.js
index 6de8496..c96231a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Map.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/Map.js
@@ -46,6 +46,12 @@ FLEXJS_CLASS_INFO =
 
 
 /**
+ *
+ */
+org.apache.flex.maps.google.Map.prototype.searchResults = null;
+
+
+/**
  * @override
  * @protected
  * @return {Object} The actual element to be parented.
@@ -75,6 +81,7 @@ org.apache.flex.maps.google.Map.prototype.set_token = function(value) {
 /**
  */
 org.apache.flex.maps.google.Map.prototype.finishInitalization = function() {
+  this.loadMap(37.333, -121.900, 12);
   this.initialized = true;
   this.dispatchEvent('ready');
 };
@@ -82,18 +89,22 @@ org.apache.flex.maps.google.Map.prototype.finishInitalization = function()
{
 
 /**
  * @expose
- * @param {Number} centerLat center latitude.
- * @param {Number} centerLong center longitude.
- * @param {Number} zoom zoom level.
+ * @param {number} centerLat center latitude.
+ * @param {number} centerLong center longitude.
+ * @param {number} zoom zoom level.
  */
 org.apache.flex.maps.google.Map.prototype.loadMap =
     function(centerLat, centerLong, zoom) {
-  if (this.initialized) {
+  if (!this.initialized) {
+    this.currentCenter = new window['google']['maps']['LatLng'](centerLat, centerLong);
     var mapOptions = {};
-    mapOptions['center'] = new window['google']['maps']['LatLng'](centerLat, centerLong);
+    mapOptions['center'] = this.currentCenter;
     mapOptions['zoom'] = zoom;
     this.map = new window['google']['maps']['Map'](this.element, mapOptions);
     this.geocoder = null;
+    this.map.center_changed = goog.bind(this.centerChangeHandler, this);
+    this.map.bounds_changed = goog.bind(this.boundsChangeHandler, this);
+    this.map.zoom_changed = goog.bind(this.zoomChangeHandler, this);
   }
 };
 
@@ -115,7 +126,7 @@ org.apache.flex.maps.google.Map.prototype.setZoom =
  * @param {string} address The new center of the map.
  */
 org.apache.flex.maps.google.Map.prototype.centerOnAddress = function(address) {
-  if (!this.geocoder) this.geocoder = new google.maps.Geocoder();
+  if (!this.geocoder) this.geocoder = new window['google']['maps']['Geocoder']();
   this.geocoder.geocode({ 'address': address}, goog.bind(this.positionHandler, this));
 };
 
@@ -123,8 +134,8 @@ org.apache.flex.maps.google.Map.prototype.centerOnAddress = function(address)
{
 /**
  * @expose
  */
-org.apache.flex.maps.google.Map.prototype.markcurrentlocation = function() {
-  var marker = new google.maps.Marker({
+org.apache.flex.maps.google.Map.prototype.markCurrentLocation = function() {
+  var marker = new window['google']['maps']['Marker']({
     map: this.map,
     position: this.currentCenter
   });
@@ -145,6 +156,49 @@ org.apache.flex.maps.google.Map.prototype.markAddress =
 
 
 /**
+ * @expose
+ * @param {Object} location A LatLng that denotes the position of the marker.
+ * @return {Object} A marker object.
+ */
+org.apache.flex.maps.google.Map.prototype.createMarker =
+    function(location) {
+  var marker = new window['google']['maps']['Marker']({
+    map: this.map,
+    position: location
+  });
+  return marker;
+};
+
+
+/**
+ * @expose
+ * @param {string} placeName A place to search for.
+ */
+org.apache.flex.maps.google.Map.prototype.nearbySearch =
+    function(placeName) {
+  if (this.markers == null) this.markers = [];
+  this.service = new window['google']['maps']['places']['PlacesService'](this.map);
+  this.service.nearbySearch({'location': this.currentCenter,
+    'radius': 5000,
+    'name': placeName}, goog.bind(this.searchResultHandler, this));
+};
+
+
+/**
+ * @expose
+ */
+org.apache.flex.maps.google.Map.prototype.clearSearchResults =
+function() {
+  if (this.markers) {
+    for (var i = 0; i < this.markers.length; i++) {
+      this.markers[i]['setMap'](null);
+    }
+    this.markers = null;
+  }
+};
+
+
+/**
  * @param {Array} results The found location(s).
  * @param {string} status Status of the call.
  */
@@ -153,7 +207,10 @@ org.apache.flex.maps.google.Map.prototype.positionHandler =
   if (status == window['google']['maps']['GeocoderStatus']['OK']) {
     this.currentCenter = results[0]['geometry']['location'];
     this.map['setCenter'](this.currentCenter);
-    window.dispatchEvent('mapCentered');
+
+    var newEvent = document.createEvent('Event');
+    newEvent.initEvent('mapCentered', true, true);
+    window.dispatchEvent(newEvent);
   } else {
     alert('Geocode was not successful for the following reason: ' + status);
   }
@@ -177,3 +234,59 @@ org.apache.flex.maps.google.Map.prototype.geoCodeHandler =
     alert('Geocode was not successful for the following reason: ' + status);
   }
 };
+
+
+/**
+ * @param {Array} results The result of the search.
+ * @param {string} status Status of the search.
+ */
+org.apache.flex.maps.google.Map.prototype.searchResultHandler =
+function(results, status) {
+  this.places = results;
+  if (status == window['google']['maps']['places']['PlacesServiceStatus']['OK']) {
+    for (var i = 0; i < results.length; i++) {
+      var place = results[i];
+      this.markers.push(this.createMarker(place['geometry']['location']));
+    }
+    var event = document.createEvent('Event');
+    event.results = this.places;
+    event.initEvent('searchResults', true, true);
+    window.dispatchEvent(event);
+  }
+};
+
+
+/**
+ * Handles changes in map center
+ */
+org.apache.flex.maps.google.Map.prototype.centerChangeHandler =
+    function() {
+  this.currentCenter = this.map['getCenter']();
+
+  var newEvent = new org.apache.flex.events.Event('centered');
+  this.dispatchEvent(newEvent);
+};
+
+
+/**
+ * Handles changes in map bounds
+ */
+org.apache.flex.maps.google.Map.prototype.boundsChangeHandler =
+    function() {
+  this.currentCenter = this.map['getCenter']();
+
+  var newEvent = new org.apache.flex.events.Event('boundsChanged');
+  this.dispatchEvent(newEvent);
+};
+
+
+/**
+ * Handles changes in map bounds
+ */
+org.apache.flex.maps.google.Map.prototype.zoomChangeHandler =
+    function() {
+  this.currentCenter = this.map['getCenter']();
+
+  var newEvent = new org.apache.flex.events.Event('zoomChanged');
+  this.dispatchEvent(newEvent);
+};

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/26eadd3f/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js
index 1adc969..c388802 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/maps/google/beads/MapView.js
@@ -50,7 +50,7 @@ function(value) {
   var src = 'https://maps.googleapis.com/maps/api/js?v=3.exp';
   if (token)
     src += '&key=' + token;
-  src += '&sensor=false&callback=mapInit';
+  src += '&libraries=places&sensor=false&callback=mapInit';
 
   var script = document.createElement('script');
   script.type = 'text/javascript';
@@ -58,16 +58,8 @@ function(value) {
 
   window.mapView = this;
   window['mapInit'] = function() {
-      this.mapView.finishInitalization();
+      this.mapView.strand_.finishInitalization();
     };
-  document.body.appendChild(script);
-};
-
-
-/**
- */
-org.apache.flex.maps.google.beads.MapView.prototype.finishInitalization = function() {
-  this.strand_.initialized = true;
-  this.strand_.dispatchEvent('ready');
+  document.head.appendChild(script);
 };
 


Mime
View raw message