0

アプリで 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));

誰でも提案できます。

4

0 に答える 0