Implements range-context.js