How to get the widget's own ID?

As the title said, I want different widgets to have dynamic id variable indicating their own IDs, should be a very obvious thing but I really couldn't find anything in the documentation.
Thanks in advance!

In a script:

getProp(this, 'id')

In a non-script property: @{this.id}

thank you so much!