Let me try to clarify my question. When I'm asking about something modifying "the source", I'm not referring to the Javascript source of my plugin; I'm talking about the source of a tiddler that the plugin might be acting upon.
My plugin looks for particular delimiting markers in a tiddler's source, and when it finds text that is delimited by these markers, it presents the user with an interface element to interact with; the delimited text is either displayed or not displayed depending on what the user does with the element. (I know the standard way to do this is simply to change between CSS classes, but it's a bit more complicated than what I've described.) Because I expect that the text between the delimiters may be very large, I'd rather not be copying the entire text into memory, so the alternative I was planning to use was to store the offsets at which the delimited text had been found, and have the interface element display the substring of getTiddlerText that occurs between those offsets when it's called upon to display the text. However, that design only works if getTiddlerText always returns the same text as it did when the offsets were being recorded. If instead it's possible for the text of a tiddler to be changed *while the rendered version of that tiddler is being displayed,* then the interface element might give the instruction "Show the text that's between offsets 100 and 200 in this tiddler's source," when the text that WAS between those offsets when the interface element was created is no longer what's there. Does that make it clearer what my concern is? I apologize if I'm not communicating well. On Oct 20, 7:51 am, PMario <[email protected]> wrote: > The core functions, you use to edit and save a tiddler content, can be > used by any code executed in the browser. So yes, any other plugin can > change your code. > > Due to the nature of browser JS, your code can be modified, even > without touching your tiddler/plugin. Just change your programm in the > browsers memory. > > -m -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
