Is anyone doing this? I have a script which works in the console, but has serious problems when I embed it in the page. The main issue is that the location of that information (a comment after the </body> tag but before the </html> tag) is very difficult to identify cleanly and access in the document object.
Gawain,
I've never done anything with iframes before, but of course the cross-origin policy is a thing. Do I correctly understand that you have an iframe embedded in your TNEW page, and so the "*" selector is trying to filter its elements as a result? Changing back to the body selector would probably exclude it... not sure if there are better options.
Good question about the IFRAME, I'll have to dig in to what is going on, but I assumed it was just complaining about our locally-hosted template.
So far as I can tell, though, the body selector doesn't contain that final comment, which makes sense, it's outside of the <body> tags.
Oh, that's weird. We use a locally-hosted template as well, but when I get $("body").contents() it contains the comment even though its outside the body. But if you're not getting it, that means its implementation-specific and not suitable for use (I was testing on Safari and Chrome).
I just asked an SO question about this -- feel free to throw it an upvote: http://stackoverflow.com/q/34109501/152891 (or answer it if you're better at DOM traversal than I am).
Hey Gawain,
Try the last code example on this accepted answer: http://stackoverflow.com/a/34109699/152891
I just tried it in the console on your calperformances site and it seems to work!
Hey, that seems to work great! I've given you votes, although I'm too disreputable on SO to actually have my votes appear...