============================================================================= SPECIALIZED CLASS TYPE CHECKING METHODS ============================================================================= IsInstanceOfConstructor checks if the value is an instance of a specific constructor This uses JavaScrip
(constructor *Value)
| 1242 | // IsInstanceOfConstructor checks if the value is an instance of a specific constructor |
| 1243 | // This uses JavaScript's instanceof operator semantics |
| 1244 | func (v *Value) IsInstanceOfConstructor(constructor *Value) bool { |
| 1245 | return v != nil && constructor != nil && v.IsObject() && constructor.IsFunction() && |
| 1246 | C.JS_IsInstanceOf(v.ctx.ref, v.ref, constructor.ref) == 1 |
| 1247 | } |
| 1248 | |
| 1249 | // TypedArray detection methods |
| 1250 | func (v *Value) typedArrayType() (int, bool) { |