add support for method in Javascript-Graph