Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: How come I don't get a box when I add an eventlistener? Date: Thu, 10 Feb 2022 14:55:25 +0100 Lines: 19 Message-ID: References: <24969684-2577-4eb1-b316-0b490769f615n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net 4QWaqHfNVlFk/ueCWVzYEQ/HqG9oigNlyDYP8J4d0bUDESyYUz Cancel-Lock: sha1:frELGJ++FE/kX78txASOfqBnxR0= Content-Language: de-DE In-Reply-To: <24969684-2577-4eb1-b316-0b490769f615n@googlegroups.com> Xref: csiph.com comp.lang.javascript:40780 chad altenburg: > When I comment out the event listener code, I get a black box. However, when I don't, I don't get a black box. Why? Because you have an error in your code. You write: addEventListener(); However this function does not exist. I assume it should be: addListener(); Next time please check the web developer console of your browser (F12) and select "Console" to see error messages caused by your script. -- Arno Welzel https://arnowelzel.de