DOM  Delegator implementation for browser and nodeJS