Maybe a simple example can help. This assumes we run in a test environment which has the ability to detach a buffer. The example is from the linked test262 test but a bit shorter.
const elementSize = Float64Array.BYTES_PER_ELEMENT; // 8
let buffer = new ArrayBuffer(2 * elementSize);
let typedArray = new Float64Array(buffer, elementSize, 1);
typedArray.constructor = {
[Symbol.species]: function(_, offset, _) {
print("elementSize: " + elementSize);
print("offset: " + offset);
return new Float64Array(1);
}
};
let end = {valueOf() {$262.detachArrayBuffer(buffer); return 0;}};
typedArray.subarray(1, end);
Currently we print the offset = 16, but I wonder if we detached the buffer if it makes sense to still access the offset from it.