ram
1/10/2016 11:02:00 PM
ram@zedat.fu-berlin.de (Stefan Ram) writes:
>ram@zedat.fu-berlin.de (Stefan Ram) writes:
>>Is their IDL restricted to single inheritance?
>The DOM4-IDL seems to have inherited (no pun intended)
>single inheritance from JavaScript.
I would like to show in my course that »Document« is a
»subclass« (using a term from the Java world) of »Node«.
I could do this as follows:
|< new Document instanceof Node
|> true
, but at that point in my course, I have not yet introduced »new«.
I could show them this (calls and the dot notation were
already explained):
|< Object.getPrototypeOf( Document.prototype ).constructor.name
|> "Node"
, but this would still be too complicated at this point in
the course, and I also have not yet explained prototypes nor
constructors at this point.
Sigh, so I am afraid, there is no way to show this that only
uses calls, dot notation, and operators, and is small and
easy as »new Document instanceof Node«?