Re: How can I read html data of other site (with javascript or etc)?
- From: Sean Kinsey <okinsey@xxxxxxxxx>
- Date: Sun, 28 Mar 2010 10:45:51 -0700 (PDT)
On Mar 28, 7:24 pm, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
Sean Kinsey wrote:
[Thomas 'PointedEars' Lahn wrote:]
[Sean Kinsey wrote:]Whereas availability is well beside the point, though.
but I do know that those features _are_ indeed available in all the
target browsers (that being IE6/IE7).
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..
There is your problem.Well I do expect it to work reliably on all the target browser,So in order to reach some goal (enabling cross domain messaging) IYou are allowed to do anything stupid. Just do not expect it to work
am now _not_ allowed to use the only available techniques usable
for said goal?
reliably, or promote it as such, and see yourself as having really
understood what you are doing.
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 targetHow many combinations of data have you tested?
browsers.
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
.
- Follow-Ups:
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- Re: How can I read html data of other site (with javascript or etc)?
- References:
- How can I read html data of other site (with javascript or etc)?
- From: Mahdi Rad
- Re: How can I read html data of other site (with javascript or etc)?
- From: johnwlockwood
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- Re: How can I read html data of other site (with javascript or etc)?
- From: Sean Kinsey
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- Re: How can I read html data of other site (with javascript or etc)?
- From: Sean Kinsey
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- Re: How can I read html data of other site (with javascript or etc)?
- From: Sean Kinsey
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- Re: How can I read html data of other site (with javascript or etc)?
- From: Sean Kinsey
- Re: How can I read html data of other site (with javascript or etc)?
- From: Thomas 'PointedEars' Lahn
- How can I read html data of other site (with javascript or etc)?
- Prev by Date: Can code in a script file start running before file loaded?
- Next by Date: Re: How can I read html data of other site (with javascript or etc)?
- Previous by thread: Re: How can I read html data of other site (with javascript or etc)?
- Next by thread: Re: How can I read html data of other site (with javascript or etc)?
- Index(es):
Relevant Pages
|