He said "limitation" in the same sentence as "the framework"
Humor aside, I’m sure there are probable half a dozen ways of doing this; this is just the way that the snippet’s developer chose. In my case, I’m much more comfortable in PHP than I am in javascript, and tend to minimalize the javascript as much as possible.