Add better support for customization of BaseView, and add unit tests.

Review Request #12912 — Created March 23, 2023 and submitted

Information

Spina
master

Reviewers

This change adds a missing attributes option for BaseView, and
updates several static attributes to let them work as functions (as
allowed by Backbone).

The static functions have access to this, since they're copied to the
prototype at class construction time and executed on the instance.

Unnecessary declarations for some instance-level types have been
removed.

New ElementAttributes and EventsHash types have been added and
exported. These allow easier reference without using Backbone.

Unit tests have been added to test all the static attribute/function
behavior during class construction and usage, render/visibility-related
methods, and all event management functions.

Unit tests pass.

Summary ID
Add better support for customization of BaseView, and add unit tests.
This change adds a missing `attributes` option for `BaseView`, and updates several static attributes to let them work as functions (as allowed by Backbone). The static functions have access to `this`, since they're copied to the prototype at class construction time and executed on the instance. Unnecessary declarations for some instance-level types have been removed. A new `ElementAttributes` type has been added and exported, mapping to `Backbone.ObjectHash`. Unit tests have been added to test all the static attribute/function behavior during class construction and usage, render/visibility-related methods, and all event management functions.
8e76fc636879f81a11b41e57e400d5be990c569c
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (1ec62b6)
Loading...