I would love to see a concrete, documented example of this code sharing between the server-side and client-side. I'm not interested in "context switching" but I am extremely interested in how to actually share code between the two environments; I believe this is part of the key to creating more accessible content.
Could you point me to something I could look at further?