Skip to content

Commit be0c46a

Browse files
committed
Translate comments of "head.html"
1 parent 3ab3926 commit be0c46a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

1-js/09-classes/07-mixins/head.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
let eventMixin = {
33

44
/**
5-
* Subscribe to event, usage:
5+
* :متعهد ساختن به یک رویداد، کاربرد
66
* menu.on('select', function(item) { ... }
77
*/
88
on(eventName, handler) {
@@ -14,7 +14,7 @@
1414
},
1515

1616
/**
17-
* Cancel the subscription, usage:
17+
* :لغو کردن تعهد، کاربرد
1818
* menu.off('select', handler)
1919
*/
2020
off(eventName, handler) {
@@ -28,15 +28,15 @@
2828
},
2929

3030
/**
31-
* Generate the event and attach the data to it
31+
* ایجاد یک رویداد همراه با داده و نام داده شده
3232
* this.trigger('select', data1, data2);
3333
*/
3434
trigger(eventName, ...args) {
3535
if (!this._eventHandlers || !this._eventHandlers[eventName]) {
36-
return; // no handlers for that event name
36+
return; // کنترل‌کننده‌ای برای این نام رویداد وجود ندارد
3737
}
3838

39-
// call the handlers
39+
// فراخوانی کنترل‌کننده‌ها
4040
this._eventHandlers[eventName].forEach(handler => handler.apply(this, args));
4141
}
4242
};

0 commit comments

Comments
 (0)