ported ext/dom