Closed NickColley closed 7 years ago
Standard HTML attributes such as onclick="handleFooClick()"
always passthrough untouched, but Marko Widgets has special compile-time handling for w-onclick="handleFooClick"
. We use the w-
prefix as a way to namespace non-standard HTML attributes that are specially handled by Marko Widgets while letting standard HTML continue to behave exactly as expected. We didn't want to hijack standard HTML attributes and change their behavior.
And yes, the w-
prefix is short for "widget-" as indicator that the attribute is handled by Marko Widgets.
Hope that answers your question. I'm going to close the issue but feel free to add more comments here or reopen if you feel compelled :)
I'm guessing the prefix stands for 'Widget?', is there a reason that they need to be prefixed?
(Sorry for the stupid question :))