Memoize DOM element access.