Forum Feature requests

innerHTML

JoeChip
Hi

I have to decide on a pdf converter for a project, but the 'innerHTML' bug is going to get in the way. Can you give a rough ETA of having this feature? Or would it be better to use DocRaptor?

Thanks
mikeday
At the moment it's still a bit too early to tell when innerHTML will be supported. You can still use other DOM methods to create and modify the document structure in the meantime, but if you have large existing scripts that make use of it then you may need to find another way.
JoeChip
Hi Mike

I have quite a few scripts that create graphs for me, so using other DOM elements will not be possible for now. Would I be able to make this work with DocRaptor?
mikeday
Good question, DocRaptor has its own JavaScript support if I recall correctly, so this might be worth a try.
mikeday
Prince 8.1 is now available for download, with support for the DOM innerHTML property in JavaScript.
StoneCypher
Great news!

Unfortunately, Math.rand() still isn't seeded. :/

John Haugeland is http://fullof.bs/

mikeday
You can do it yourself, with Math.seedRandom(...). :D
jim_albright
And this is better because you can test out rand in a consistent way before making it truly random.

Jim Albright
Wycliffe Bible Translators

StoneCypher
In Prince 8.1 we have added a Math.seedRandom() function that can be used to seed the random number generator, eg. with the current time.


I just found this elsewhere.

Why is this not being called at virtual machine start, in accord with the specification?

John Haugeland is http://fullof.bs/

StoneCypher
Mr. Albright: there is no such thing as "truly random," and the characteristics of the JS PRNG are not testable, since the underlying random number generator is not defined.

In fact, there's really only three things defined about the JS PRNG: that it exists, that it operates on the [0,1) interval, and that it starts seeded.

John Haugeland is http://fullof.bs/

StoneCypher
Mr. Day:

It would help to know what PRNG is in use and what the seed format is, so that I can make an appropriate seed selection.

John Haugeland is http://fullof.bs/

mikeday
It's just the rand() function from C stdlib, so it depends upon the system libc.