This makes it easier to extend support for new types (e.g., 'open') without adding more conditional logic to the JavaScript.