LinkWidget.prototype.name = "link";
then we can access as
alert(widget.name)
On Tuesday, October 25, 2016 at 12:44:12 PM UTC+1, Tobias Beer wrote:
>
> Hi BJ,
>
>
>> we could add a 'type' or name to the object, but at present you would
>> need to do this:
>>
>
> Ok, I see. That doesn't look too pretty.
>
> So, a new "helper" function on the *base Widget class* would be great,
> so the prototype class would have it,
> but not every single widget would need to define its name.
>
> Any idea how to implement that? e.g.
>
> exports.type = function() {
> return ?!?;
> }
>
> Thanks,
>
> Tobias.
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/0770341b-6b5f-4790-972a-616b5c40d4b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.