If you are looking at the code in Construct's built-in behaviors, all of that is considered internal details for support purposes, and we won't provide any support for that or answer any questions about them. It is not intended that anyone looks at internal code, and internal code can change at any time for any reason, including completely replacing it.
Many of the behaviors are also pretty old (with code originally dating back 10 years or more), and as anyone who has dealt with codebases over that period of time can advise, such code is often full of odd quirks, compatibility changes, and other weird stuff, and so I would strongly caution against trying to infer what kind of code you ought to be writing from internal code.