アプリで Google マップを使用していますが、マーカーをクリックした後にクリックイベント オブジェクトを使用したいと考えています。通常、 onclickでイベント オブジェクトを渡します。
<element onclick="SomeJavaScriptCode(event)">
と
function SomeJavaScriptCode(e){
alert(e.type)
};
私のコードは
google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function (e) {
// e is not working
var e = window.event; // it is working fine in chrome and IE, but not working in Firefox.
}
})(marker, i));
誰でも提案できます。