Chuyển đến nội dung chính

Alias

  • hookfunc
  • replaceclosure
  • detourfunction
  • detour_function

Đối số

function
bắt buộc
Function cần patch. Truyền non-function sẽ tạo type error.
function
bắt buộc
Function có function được install hoặc map lên target. Truyền non-function sẽ tạo type error.

Giá trị trả về

function
Cloned copy của original target closure được tạo trước khi hook được install.

Ví dụ

Patch a function closure and keep a cloned original.