Sunday, February 12, 2017

promise

<textarea id="atnbg20170212su1433" style="height: 200px; left: 200px; top: 100px; width: 400px;"></textarea>

<div id="atnbg20170212su1433nav" style="color: burlywood; height: 300px; left: 200px; top: 320px; width: 400px;">
</div>
<div id="atnbg20170212su1433string" style="display: none;">
</div>
<a href="javascript:atnbg20170212su1433()"></a>




procedurally building HTML

some procedures:

function openatagbase(tagname) {}

function addanattribute(atttributename,value) {}

function finishatagbase() {}

function finishanintegraltag() {}

function addastring(thestring) {}


procedurally building JavaScript

the top level can contain

these kinds of statements:
variable declarations and assignments
loop declarations
branching declarations
function declarations
function calls

building the top level:
given a list of statements
display the statements in the editing field
display the statements in the navigation field

the statement declarations are displayed with empty bodies
each statement declaration is linked in the navigation field

storing JavaScript in HTML
in a span for the whole script
for each statement in the top level create a span
with its own id
in a span for a statement
for each statement in the statement create a span
with its own id
thus
procedurally
how is it recorded?

not quite what I was thinking.

ok.

in the span for a level there are two types of spans
text spans (class = text) and procedure spans (class = procedure).
when displaying a level, then,
text span inner HTML is displayed
procedural spans are not displayed


the new document function replaces the entire innerHTML of the top level span with a null string.

it puts a null sting in the editor textarea and in the navigator.

you can now type ... what ... spans? ... and add them to the top level span?

doesn't the top level span document procedures?

a given procedure adds a function declaration ...
to ... what? to the output of the entire script ... the get script function

plus, when the level to which the procedure is added is displayed in the navigator
it adds a link to the navigator panel ... or just a statement.

in the navigator these display as links.

just kiding


<span id="top"><span id="a1">function getmonthlyrecord() {</span></span>

this looks promising!