From 3de3b4ff0010ccf9f1091fbafb8d7d8a575608f6 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sat, 21 Nov 2020 10:13:21 +0100 Subject: [PATCH] api documentation update for "loadProjectXML" --- API.md | 18 +++++++++++++++++- HISTORY.md | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index ed767412..a6e46b2a 100755 --- a/API.md +++ b/API.md @@ -1,6 +1,6 @@ # The Snap! API -Jens Mönig, Bernat Romagosa, November 18, 2020 +Jens Mönig, Bernat Romagosa, November 21, 2020 This document describes how Snap! can be accessed from an outside program to start scripts, send and retrieve information. The model use case is embedding interactive Snap! projects in other websites such as MOOCs or other adaptive learning platforms. @@ -31,6 +31,7 @@ Currently the API consists of the following methods: #### Access the Serialized Project * IDE_Morph.prototype.getProjectXML() +* IDE_Morph.prototype.loadProjectXML() ## Referencing the IDE @@ -197,6 +198,21 @@ the getProjectXML() method returns a string in XML format representing the seria #### return value an XML String + +### IDE_Morph.prototype.loadProjectXML() +the loadProjectXML() method replaces the current project of the IDE with another serialized one encoded in a string in XML format. Note that no user acknowledgement is required, all unsaved edits to the prior project are lost. + +#### syntax + ide.loadProjectXML(projectData); + +#### parameters +* projectData + * XML string representing a serialized project + +#### return value +unefined + + ## Manipulating Lists Snap! lists can be accessed and manipulated through a set of methods described in the file `lists.js` diff --git a/HISTORY.md b/HISTORY.md index e85695f3..9fdc71d9 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,10 +4,13 @@ * **Notable Changes:** * added "loadProjectXML" method to the api +* **Documentation Updates:** + * API update for "loadProjectXML" ### 2020-11-21 * new dev version * api: new loadProjectXML() method +* updated api documentation ## 6.3.6 * **Notable Changes:**