You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2026/02/10 13:21:32 UTC

(myfaces-tobago) 01/02: fix: unnecessary JavaScript warning

This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 5e496dfe58136d1fba5d23acb8cda1daa17e6de5
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Tue Feb 10 14:01:52 2026 +0100

    fix: unnecessary JavaScript warning
    
    The JS warning "Can't find an element for the event. Use parentElement instead." is now logged as "debug" instead of a "warning".
    
    Issue: TOBAGO-2469
---
 tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
index 1ec98f7119..a7442faddb 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
@@ -45,10 +45,9 @@ class Behavior extends HTMLElement {
         if (eventElement) {
           eventElement.addEventListener(this.event, this.eventListener);
         } else {
-          // if the clientId doesn't exists in DOM, it's probably the id of tobago-behavior custom element
+          // if the clientId doesn't exist in DOM, it's probably the id of tobago-behavior custom element
           this.parentElement.addEventListener(this.event, this.eventListener);
-          // todo: not sure if this warning can be removed;
-          console.warn("Can't find an element for the event. Use parentElement instead.", this);
+          console.debug("Can't find an element for the event. Use parentElement instead.", this);
         }
       }
     }