Faking synchronous AJAX can.view helper from 2.3

In slack, a community member asked how to make the old can.view(url) work. Example:

var view = can.view("/path/to/view.stache");

In 6.0, due to the removal of NodeLists making something like this work in a memory-safe way has become a lot easier.

Here’s an example of lazyView in action: https://codepen.io/justinbmeyer/pen/bGGpWaO?editors=0010

class MyCounter extends StacheElement {
	static view = lazyView("/some/path.stache");

	static props = {
		count: 0
	};

	increment() {
		this.count++;
	}
}