Hello,
Does the data loaded by a captured script's document.write() get
loaded into the DOM tree before the next statement executes? If not,
then can we provide write capture with some kind of callback that will
be used after it has finished loading the 3rd party script? (so that
the generated DOM may be manipulated)
I have the following in of my blogger posts:
1) Get jQuery
<script
src="
http://code.jquery.com/jquery-1.6.4.min.js"
type="text/javascript"
charset="utf-8">
</script>
2) Get the write capture js
<script
src="
http://raw.github.com/iamnoah/writeCapture/master/
writeCapture.js"
type="text/javascript"
charset="utf-8">
</script>
3) Get the js for making write capture serve as a jQuery plugin
<script
src="
http://raw.github.com/iamnoah/writeCapture/master/plugin/
jquery.writeCapture.js"
type="text/javascript"
charset="utf-8">
</script>
4) Inject the output of a Gist script into a placeholder and change
the background color of line 3 (id=LC3) but this color doesn't take
effect :(
<script type="text/javascript">
$(document).ready(
function() {
$('#foo').writeCapture().html(
'<scrip'+'t src="
https://gist.github.com/1243028.js"> </
s'+'cript>'
);
$('#LC3', '#foo').css({'background-color': 'green', 'color':
'green'});
});
</script>