Failed to set the ‘_$visited’ property on ‘DOMStringMap’: ‘data-_$visited’ is not a valid attribute name

218 views Asked by At

We are using breeze.js with entity framework to initiate client side entity management.

We randomly get "Failed to set the ‘$visited’ property on ‘DOMStringMap’: ‘data-$visited’ is not a valid attribute name" error the the breeze.js from __toJSONSafe method of it.

does anybody have any idea what could make "obj._$visited" property undefined? It is coming up as undefined and that is causing the issue during call to the saveChanges()

1

There are 1 answers

1
Ward On

I'm guessing ... it seems like you've added some kind of DOM object to the entity before saving it. I can't imagine how else you could be subjecting the DOMStringMap to __toJSONSafe.

Would need to know more precisely what object (and entity) is involved when you get this exception.

You say it happens randomly. That doesn't make it easy on any of us. If you can make it happen often enough to detect, you could patch the __toJSONSafe method in your local copy of breeze.debug.js so that you can better trap the error and the information about what makes it happen.

Come back and share that information with us.