content and viewport must only be used in link fn.

Using them in the compile function doesn't work if sf-virtual-repeat is inside another repeat (for example). Added a demo page to test it.