El martes, 6 de octubre de 2015, 23:43:49 (UTC+2), BJ escribió:
>
> HI Danielo,
> It is possible to write a widget that creates a dom element and attaches
> it outside of the page container - it can then listen for dom events
>
Indeed. I know that I can listem for events the old normal way. But the
problem is not only listening to events, but taking advantage of all the
rendering capabilities that TW provides.
>
> var messageBox = doc.getElementById("tiddlyclip-message-box");
> if(!messageBox) {
> messageBox = doc.createElement("div");
> messageBox.id = "tiddlyclip-message-box";
> messageBox.style.display = "none";
> doc.body.appendChild(messageBox);
> }
> // Attach the event handler to the message box
> messageBox.addEventListener("tiddlyclip-save-file", onSaveFile,false);
>
>
Your listener seems to be just a listener, without any DOM rendering. What
I want is some interface that can be placed outside TW and survives hidding
the whole TW container (tc-page-wrapper display none). This is not possible
because all the widget tree will become "invisible"
But thank you very much for the detailed code, I'm sure I will make good
use of it at some point.
>
> and the onSaveFile() function generates messages.
>
What kind of messages exactly? Do you mean that it dispatch the messages to
TW?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ea5541ab-d455-43c0-91b1-06e0bea1c7fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.