Use RefCell in DOMRefCell to reduce duplicated code.