Metaprogrammalash ma’lumotnomasi
To‘liq Reflect ma’lumotnomasi
Qayta ko‘rib chiqilgan: 2025-yil dekabr
| Metod | Tavsif |
|---|---|
| Reflect.apply() | Funksiyani chaqirish |
| Reflect.construct() | Create object (like new) |
| Reflect.defineProperty() | Xususiyatni aniqlash |
| Reflect.deleteProperty() | Xususiyatni o‘chirish |
| Reflect.get() | Xususiyatni olish |
| Reflect.getOwnPropertyDescriptor() | Get property descriptor |
| Reflect.getPrototypeOf() | Obyektning prototipini oling |
| Reflect.has() | Xususiyat mavjudligini tekshirish |
| Reflect.isExtensible() | Obyekt o‘sishi mumkinligini tekshiring |
| Reflect.ownKeys() | Barcha kalitlarni olish (symbol kalitlarni ham) |
| Reflect.preventExtensions() | Obyektning kengayishini to‘xtatish |
| Reflect.set() | Xususiyatni o‘rnatish |
| Reflect.setPrototypeOf() | Obyektning prototipini o‘rnating |
Nega Reflect
Reflect xavfsiz va moslashuvchan, ayniqsa proksi-server ichida foydalanilganda.
To‘liq Proxy handler ma’lumotnomasi
Qayta ko‘rib chiqilgan: 2025-yil dekabr
| Metod | Tavsif |
|---|---|
| handler.apply() | Funksiyani chaqirish |
| handler.construct() | Create object (like new) |
| handler.defineProperty() | Xususiyatni aniqlash |
| handler.deleteProperty() | Xususiyatni o‘chirish |
| handler.get() | Xususiyatni olish |
| handler.getOwnPropertyDescriptor() | Get property descriptor |
| handler.getPrototypeOf() | Obyektning prototipini oling |
| handler.has() | Xususiyat mavjudligini tekshirish |
| handler.isExtensible() | Obyekt o‘sishi mumkinligini tekshiring |
| handler.ownKeys() | Barcha kalitlarni olish (symbol kalitlarni ham) |
| handler.preventExtensions() | Obyektning kengayishini to‘xtatish |
| handler.set() | Xususiyatni o‘rnatish |
| handler.setPrototypeOf() | Obyektning prototipini o‘rnating |
JavaScript ichki metodlari
Barcha JavaScript obyektlarida 13 ta ichki metod mavjud.
Har bir usulda tegishli proksi tuzoq mavjud:
| Internal Operation | Proxy trap |
|---|---|
| [[Construct]] | construct() |
| [[Call]] | apply() |
| [[Get]] | get() |
| [[Set]] | set() |
| [[HasProperty]] | has() |
| [[Delete]] | deleteProperty() |
| [[DefineProperty]] | defineProperty() |
| [[GetOwnProperty]] | getOwnProperty() |
| [[OwnPropertyKeys]] | ownPropertyKeys() |
| [[IsExstensible]] | isExtensible() |
| [[PreventExstensions]] | preventExtensions() |
| [[GetPrototypeOf]] | getPrototypeOf() |
| [[SetPrototypeOf]] | setPrototypeOf() |
Har bir proksi tuzog‘ida bir xil nom va imzo bilan Reflect usuli mavjud.
| Internal Operation | Reflect Method |
|---|---|
| [[Construct]] | Reflect.construct() |
| [[Call]] | Reflect.apply() |
| [[Get]] | Reflect.get() |
| [[Set]] | Reflect.set() |
| [[HasProperty]] | Reflect.has() |
| [[Delete]] | Reflect.deleteProperty() |
| [[DefineProperty]] | Reflect.defineProperty() |
| [[GetOwnProperty]] | Reflect.getOwnProperty() |
| [[OwnPropertyKeys]] | Reflect.ownPropertyKeys() |
| [[IsExstensible]] | Reflect.isExtensible() |
| [[PreventExstensions]] | Reflect.preventExtensions() |
| [[GetPrototypeOf]] | Reflect.getPrototypeOf() |
| [[SetPrototypeOf]] | Reflect.setPrototypeOf() |
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
