Re: disqus reply.html iframe placeholder out of place
Posted: Fri Aug 12, 2011 3:29 pm
A few questions about how it would work:Giorgio Maone wrote:A "before" surrogate can be easily turned into an "after" surrogate by registering a throw away capturing onload event handleal_9x wrote:I am hoping you will implement the after surrogate.
- what do you mean by throw away?
- since you would be registering only when the script is about to be loaded, would an earlier content registration on the doc (such a thing is unlikely, typically content registers on the target itself, but still worth understanding) be invoked first?
- when before is invoked, will the script element already exist? If yes,
- could something be done to allow the load handler to match the target by identity rather than tagName and src? i.e. the surrogate would somehow need to get passed a reference to the matched <script>
- could you not attach the load handler with a match by object identity yourself? This would make the after surrogate explicit, smaller and simpler. I was not suggesting that after should be instead of before, but that it should be a first class citizen, hiding the boilerplate of attaching handlers and rematching targets by regex