add example and fixed Domain.js bug