From this documentation:
Stack:
A stack is a data structure that JavaScript uses to store static data. Static data is data where the engine knows the size at compile time. In JavaScript, this includes primitive values (strings, numbers, booleans, undefined, and null) and references, which point to objects and functions.
Heap:
The heap is a different space for storing data where JavaScript stores objects and functions.
Coming to your question: Does the heap only contain pointers?
No, JS doesn't have pointers. You can consider objects are pointers in JS.
Unlike in C, you can't see the actual address of the pointer nor the actual value of the pointer, you can only dereference it (get the value at the address it points to.)
From this, here is a nice example with explanation:
//this will make object1 point to the memory location that object2 is pointing at
object1 = object2;
//this will make object2 point to the memory location that object1 is pointing at
function myfunc(object2){}
myfunc(object1);
Let me know if it helps.