Re: How can I read html data of other site (with javascript or etc)?



On Mar 28, 7:24 pm, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
Sean Kinsey wrote:
[Thomas 'PointedEars' Lahn wrote:]
[Sean Kinsey wrote:]
but I do know that those features _are_ indeed available in all the
target browsers (that being IE6/IE7).
Whereas availability is well beside the point, though.

Actually, when it comes to a pragmatic approach towards leveraging the
available features of a browser in order to gain new features, then it is
in fact the only point.

No, further you need to make sure that an available feature under probable
circumstances works as you expect.  Since that is next to impossible, host
object's properties, which by Specification exhibit undefined behavior, are
to be avoided for storing data.  And certainly doing otherwise is very far
from being reliable.  (I can see now that you not only misuse existing
properties of host objects, but you also try to augment host objects with
new properties, which is even worse than the former.)

I'm guessing your referring to the loadFn property? That was a quick
fix and I have a plan for removing it.


An assumption not supported by the available facts, of course.

I have stated an assumption, you refer to facts. Where can I see these
facts?

They come with experience for the most part.  For example, you could, in
the future, have a company as customer telling you that they would not
update from IE 6/7 because the update would render their otherwise working
software unusable.  

What is the relevance for the above statement?


Then there is the fact not requiring as much experience that there is no IE
7+ for Windows 2000, and Windows XP, Windows Vista, or Windows 7 would not
run on those machines even if their owners could afford or be willing to do
the OS upgrade.


And this?

It does not apply to the `name' property of iframe objects.
Earlier tests showed that it did (and there are many references to it
on the internet), but I'll retest as many things has changed in the
library since that piece of code was written.

That fact has not changed since MSHTML 5.0, and has been discussed in
particular by Richard Cornford here.

I just did a new test, and based on this I have removed the before
mentioned code.

I hope you have also removed the `id' attribute

And why should I remove the id attribute when it is set so that the
coder can more easily reference the iframe?

, replaced the ludicrous
absolute positioning

Why is this ludicrous when the objective is to render the iframe off-
screen?

and added some *real* feature tests while you were at
it.

Again, I would really like it for you to actually stating the
'correct' approach as well as pointing out the 'wrong' one.


To use that metaphor, you know only a *subset* of *current* nails.

Yes, and thats the 'nails' I target, and to be honest, the risk of IE6
suddenly changing its behavior is minute, if not to say non-existent.

It is a particularly silly approach on the World Wide Web, though, to
target only one specific browser brand instead of *at least* one DOM
implementation with all its non-dead past and backwards-compatible future
versions.

I don't target only one brand, so that line of arguments is void.


That said, you appear to be unaware that for IE 8 you are relying on a
feature that originates from a *working* *draft* for a Specification, which
is therefore in a constant state of flux and does not need to be supported
(the same way) in the future.  That is hardly raw material for production-
quality code.

So, do you really think there is an inherent risk of IE8 suddenly
dropping, or changing its implementation of postMessage?
No, didn't think so..


So in order to reach some goal (enabling cross domain messaging) I
am now _not_ allowed to use the only available techniques usable
for said goal?
You are allowed to do anything stupid.  Just do not expect it to work
reliably, or promote it as such, and see yourself as having really
understood what you are doing.
Well I do expect it to work reliably on all the target browser,
There is your problem.

A useless comment as my expectations are based on observable facts

Your observations are not worth much, given that there is not only the
theoretical possibility but also practical evidence of failure of this
approach.

in fact, its an observable truth that it _does_ work in the target
browsers.
How many combinations of data have you tested?

All the relevant ones.

Given that you do not know what data the user of your library is going to
transfer with it, that is quite an overconfident response, but not an
unusual one under these circumstances.

If you were referring to the payload data, then it does what it
states, it transports string messages. And yes, it uses encoding where
necessary.
If it fails at transporting binary data then that is really not the
libraries fault as that is not its intention - but the user can easily
BASE64 encode/decode the message


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16



.



Relevant Pages

  • Re: How can I read html data of other site (with javascript or etc)?
    ... target browsers. ... available features of a browser in order to gain new features, ... properties of host objects, but you also try to augment host objects with ... target only one specific browser brand instead of *at least* one DOM ...
    (comp.lang.javascript)
  • Re: How can I read html data of other site (with javascript or etc)?
    ... target browsers. ... available features of a browser in order to gain new features, ... properties of host objects, but you also try to augment host objects with ... target only one specific browser brand instead of *at least* one DOM ...
    (comp.lang.javascript)
  • Microsofts Monopoly Makes It Slow and Vulnerable
    ... Microsoft released a preview version of its Internet Explorer 7 browser ... The only real new features of this Windows-only ... already existed in Service Pack 2 for Windows XP. ...
    (comp.sys.mac.advocacy)
  • IE Browser To Preview on Right
    ... Anyway to get the IE Browser to Preview (searched items) on the right side ... features I liked better with Windows 2000, but can't do so since going to ...
    (microsoft.public.windowsxp.customize)
  • Re: Cross-Browser onmousedown JavaScript
    ... It would only make sense to implement the W3C events model if there is a demand for currently unused event features; and if this were happening, nothing would prevent Microsoft from extending the current model, rather than implementing the W3C's model. ... Given this situation, two solutions are available: either change/correct the scripts, or change/evolve the browser's model. ... The choice of changing the model looks like the less painful; after all, scripts do not need to updated, and the browser ends up with more capabilities, right? ...
    (comp.lang.javascript)