moved option "targetDocument" to optional attributes