Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window event 'map:init' not available in Chrome through addEventListener #34

Closed
stringfellow opened this issue Sep 7, 2013 · 2 comments

Comments

@stringfellow
Copy link

In the docs, it says you can get a reference to the map using a brutish way or by using an event listener.

Using the form widget version of the map (I haven't tested the normal map tags), this event listener does not work in Chrome. A simple test:

<script type="text/javascript">
    window.addEventListener('map:init', function (e) {
            console.log("addEventListener")
    }, false);
    $(window).on('map:init', function (e) {
            console.log("jQuery on");
    });
</script>

Results in the "jQuery on" message in the console. This was using Chrome 29.0.1547.65.

I guess that is less to do with the library than Chrome doing something odd, but might be worth noting that in the docs?

@stringfellow
Copy link
Author

Duplicate of #27 ?

@leplatrem
Copy link
Collaborator

Thanks for reportin' !
There is a bug indeed around jQuery detection / usage... and I might need help on that if you can :)

What you describe match with #27, it mark this as duplicate !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants