Capture the native/original functions inside a closure, similar to useNativeForDom.