Fixed an issue where DOM navigator do not work

We cannot use `helper.getId` in `initOptions` since `viewContext` is
not initialized then, so do the id generation in `initStructure`

fixed #120