Derive trace hooks automatically for all DOM types.