I tried passing the html to the constructor. No different, and in fact I
think I know what is going on.
I happen to be using qooxdoo with MathJax and I have to go thru hoops
before altering the innerhtml or Mathjax won't see the teX it has to
transform. What I am seeing (the <a> text unreplaced by the icon, inter
alia) suggests a timing problem, a race condition I guess between when
qooxdoo does its thing and transforming JS libraries do their thing
Other theories welcome. :) Or if someone has code that Just Works it will
help knowing I can drop the more elaborate theories.
-kt
On Fri, Oct 18, 2013 at 1:56 PM, Ken Tilton <[email protected]> wrote:
> Twitter provides the HTML to add a tweet button to a page:
>
> <a href="https://twitter.com/share" class="twitter-share-button"
> data-url="http://socialalgebra.com" data-via="kennytilt"
> data-hashtags="socialalgebra">Tweet</a>
> <script>!function(d,s,id){var
> js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);
> js.id=id;js.src=p+'://
> platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document<http://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);%7D%7D(document>,
> 'script', 'twitter-wjs');</script>
>
> This works great whether I put it right in the index.html and suppress
> the loading of my application script or if I just put it into a W3C Tryedit
> pane.
>
> If I try doing the same with an htmlEmbed widget It has three problems:
> (1) it does not open a pop-up. it loads a new page and (2) it does not show
> all the info/elements I see in the Tweet interface with ufiltered html (3)
> "Tweet" text is not replaced by the birdie icon.
>
> So I see a little text URL "tweet", no icon, and it does not work as well.
>
> Same thing in the Playground:
>
> http://tinyurl.com/oq4yc4t
>
>
> here is the page source (from Firefox) of the filed page:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html
> xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <meta
> http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <title>Social Algebra</title> <script type="text/x-mathjax-config">
> MathJax.Hub.Config({ messageStyle: "none" , showMathMenu: true
> , tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} , TeX: {
> Macros: { CRT:
> '\\class{mxjcaret}{\\mathord{\\smash{\\rlap{\\kern-.1em\\color{black}{\\unicode{x7C}}}}}}',
> XCRT:
> '\\class{mxjcaret}{\\mathord{\\smash{\\rlap{\\kern-.1em\\color{red}{\\unicode{x7C}}}}}}',
> CRTW:
> '\\\\mathord{\\\\smash{\\\\rlap{\\\\kern-.1em\\\\color{white}{\\\\unicode{x7C}}}}}'
> } } }); </script> <script type="text/javascript"
> src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
> </script> <script type="text/javascript"> setInterval(blink_caret, 750);
> window.onblur = function () {
> document.myFocused=false; }; window.onfocus = function ()
> { document.myFocused=true; };
> document.myFocused=true; function blink_caret() { carets =
> document.getElementsByClassName('mxjcaret'); for (var i=0, caret; caret =
> carets[i++];) { if (document.myFocused) {
> caret.style.visibility = (caret.style.visibility == 'visible') ?
> 'hidden':'visible'; } else { caret.style.visibility =
> 'hidden'; } } } </script> <!-- script>!function(d,s,id){var
> js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document
>
> <http://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);%7D%7D(document>,
> 'script', 'twitter-wjs');</script --> <script type="text/javascript"
> src="script/soa.js"></script><script type='text/javascript'
> src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script></head><!--
> body class="tex2jax_ignore" --><body><div
> style='font-size:18pt'>\(42\)</div><!DOCTYPE html><a
> href="https://twitter.com/share"
> class="twitter-share-button">Tweet</a><script>!function(d,s,id){var
> js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document
>
> <http://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);%7D%7D(document>,
> 'script', 'twitter-wjs');</script></body></html>
>
>
> If I paste the above body into W3c TryEdit it works there, too.
>
>
> I'll go study the QX embed widget to see if there are limitations I may be
> transgressing.
>
>
> Any ideas welcome.
>
>
> -kt
>
>
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel