I’m completely new to go.js and I’m trying to convert the Basic diagram into a JSON file: var modelAsText=myDiagram.model.toJson();
However when I do I get this error: GraphObject.make requires a class function or GoJS class name or name of an object builder, not: [object HTMLDocument]
That’s odd — the statement you quoted will not call GraphObject.make at all.
I suggest that you use the browser’s debugger to see where the error is actually occurring.
Are you using jQuery? Perhaps you think you are calling it in a context where $ is bound to go.GraphObject.make.
Yes, I’m using Jquery.
At the beginning of the init() function I have: var $ = go.GraphObject.make;
Should I change the name of the variable to another?
Yes, I’m using Jquery.
At the beginning of the init() function I have: var $ = go.GraphObject.make;
Should I change the name of the variable to another?