Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Uncaught TypeError: Cannot read property 'addEventListener' of null #1

Open
enzy opened this issue Nov 9, 2014 · 3 comments
Open
Assignees
Labels

Comments

@enzy
Copy link
Contributor

enzy commented Nov 9, 2014

Kód geoJumper spoléhá na přítomnost prvku v době inicializace, což neplatí za všech okolností.

var addrInputEl = document.getElementById('geoJumper');

addrInputEl.addEventListener('keydown', function codeAddress(ev) 
@enzy enzy added the bug label Nov 9, 2014
@newPromise
Copy link

can you use english ? i have the same question

@capaj
Copy link
Contributor

capaj commented Jul 17, 2017

@QianDuanGaoShou lol someone is actually visiting these old repos? the issues was that the element was not found by the id every time. Probably because the element was not rendered yet.

@newPromise
Copy link

yes , I got it , thank you ,
but do you mean we don't use like this?

document.getElementById('box').addEventListener('click', function () {
            console.log('yes')
        })

but I got the message 'yes' use Chrome

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

No branches or pull requests

3 participants