
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/28a13fd8-0cec-4c05-a668-88fad18637f0o%40googlegroups.com.
$tw.wiki.setText(title,field,index,value,options)$tw.wiki.setText("$:/vp/youtube-api-loaded","text","","true");I was hacking arount boot.js and I noticed that the YT api script actually loads in time, it’s just that the script itself is asynchronous. From https://developers.google.com/youtube/iframe_api_reference#Requirements:Any web page that uses the IFrame API must also implement the following JavaScript function:onYouTubeIframeAPIReady – The API will call this function when the page has finished downloading the JavaScript for the player API, which enables you to then use the API on your page. Thus, this function might create the player objects that you want to display when the page loads.So it’s not the question of how to delay the boot, I indeed need to force redraw some widgets after the YT api notifies the JS it finished loading.An obvious dirty hack is to wait until onYouTubeIframeAPIReady in the very end of boot.js but I’d still like to make this solution into a reasonable plugin.Any further ideas on how I can force a widget redraw from the “outside” js scope would be appreciated.--
On Tuesday, Jun 16, 2020 at 6:50 a.m., Christian Byron <christi...@gmail.com> wrote:
Hey Vladimir--I think you could a couple of things, namely :- try renaming your tiddler so it is a system tiddler ( eg $:\script\youtube.api ) ... I believe system tiddlers are loaded before content tiddlers ... not sure though that loading into the wiki store is enough to execute the script tag though...- try adding the field "module-type" with the value of "startup" and see if that changes the loading sequence enough to get it working .. not sure if this will work with the RawMarkup tagIf neither above works ... a better solution may be to change your tiddler to be type application/javascript and replace the contents with the code itself.. I know marking this with module-type = startup will make this code run before any content is rendered.Pulling in external libraries this way is the prefered approach as it makes sure it is available while offline ( although not as applicable in your use case ) .. and as the code in that link is not very big it will be a simple approachCheersCB
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddly...@googlegroups.com.

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/afa7d3ad-944a-43a7-8561-2c0bba89aa79o%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/RMWIKblWfgw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/64b402c3-19db-4119-bba4-8c0fad49369e%40Canary.

To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAJuiAb1G6CPc7vvuAtJWDHxDuCL_LCLJsH8Hfk7WHu3GScLjEQ%40mail.gmail.com.