---
id: 92
title: 'EventHandlers / EventListeners : Where, inline or code ?'
slug: eventhandlers-eventlisteners-where-inline-or-code
date: '2008-05-11T16:26:00Z'
modified: '2008-05-11T16:26:00Z'
status: publish
type: post
author: pmoelgaard
categories:
  - Uncategorized
tags:
  - Best Practices
  - Code Design
excerpt: null
canonicalPath: /posts/eventhandlers-eventlisteners-where-inline-or-code
featuredImage: null
commentCount: 0
wordCount: 35
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/eventhandlers-eventlisteners-where-inline-or-code
---
I admit it, I have a strong preference for declaring all event handlers/listeners in code. I believe it is better encapsulation, making for more scalable and more maintainable code. But this is a personal opinion.
