Update javascript to use new spiff api