Originally Posted by felgall
Thank you, It seems, this mostly resolve my initial problem.
Prototyping, according my web search, is a technology which uses "copy" and then change
object instead of inheritance.
Fine. So that is my plan to use OO approach (some people here prefer the name class based
- noway class oriented
as the search results point to radicals' web pages about the class struggle
) in JS.
I should create a HTML/CSS node, (may be invisible) and refer to it by id. If I need a new object I just copy it. If I need an object of subclass, I make a copy, change/add whatever I need and then use it as a base for that subclass.
If yes, how to code a scenario:
I need two similar buttons - backgroung-color is blue (the second one or both are created by a copy method
If I click one of them, two other buttons appear. They are similar to previous ones, but backgroung-color is red, and no onclick.
Thanks in advance