![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
FAQENTRY> FAQ 9.7 : ISTM that there may be another cause, or a refinement of that one. Firefox 3.0.14 gives me "Permission denied to get property HTMLDocument.anchors" on approximately the 150th time of doing what seems to be essentially the same thing I'm busy with several different edits to the FAQ and have not gotten to a good stopping point. |
|
Did you post an example of code that causes the error? |
#12
| ||||
| ||||
|
|
In effect, I want to read the file, HTML or TXT, as it exists on disc. |
|
You cannot do it for the reason explained at http://groups.google.com/group/comp.lang.javascript/msg/d9f3f6724bada573 |
|
Unconvincing, because I *am* doing it, |
|
to the extent that is essential for the task. *If you consider under what circumstances what can work, you should be able to deduce how and why I am doing it. |
#13
| |||
| |||
|
|
Garrett Smith wrote: Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: |
|
iframe.contentDocument.body.textContent then. I remember to have posted that explanation before, but the FAQ had not been updated for some reason. The innerText/textContent is not related to the frame; its' related to elements. The frame is a window. The (i)frame window is represented by a Window instance; the `iframe' element is not (AISB). Apparently you still need to learn the difference between element objects and other host objects. |
|
As I've stated before, neither are available in Blackberry9000. Negligibly small Blackberry market share¹ notwithstanding, that is not a good reason for ignoring any of the presented solutions at all. That is, provided it is a frequently asked question to begin with. |
#14
| |||
| |||
|
|
Thomas 'PointedEars' Lahn wrote: Garrett Smith wrote: Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: iframe.contentDocument.body.textContent then. I remember to have posted that explanation before, but the FAQ had not been updated for some reason. The innerText/textContent is not related to the frame; its' related to elements. The frame is a window. The (i)frame window is represented by a Window instance; the `iframe' element is not (AISB). Apparently you still need to learn the difference between element objects and other host objects. For those who did not notice that I wrote "the frame", and not the IFRAME element. Assuming a document with an iframe: var f = document.getElementsByTagName("iframe")[0]; f.textContent; - will not get the text content inside the iframe's document. |
|
f.contentDocument.body.textContent will (where available). Hopefully that clears up any potential ambiguity. |
|
As I've stated before, neither are available in Blackberry9000. Negligibly small Blackberry market share¹ notwithstanding, that is not a good reason for ignoring any of the presented solutions at all. That is, provided it is a frequently asked question to begin with. Where available, CharacterData is a often a good option. It is widely supported in modern browsers as: aTextNode.data |
#15
| |||
| |||
|
|
Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: Dr J R Stockton wrote: I want to read as on disc, certainly; but my needs are substantially satisfied for TXT files by what innerText and innerHTML show, and for HTML files by what is actually revealed. It's annoying that Firefox seems to lack innerText of iframe content, It implements the `textContent' property instead, like any other browser standards-compliant in that regard. (Discussed here ad nauseam). I see. Then why did you not suggest that <FAQENTRY> it should be included in the frame-content section (9.2) of the FAQ? Because I do not think it is a frequently asked question. |
|
It's still annoying that one major browser lacks what others have (even if out of fashion), especially if the functionality is present. Which browser would that be? |
|
FAQENTRY> FAQ 9.7 : ISTM that there may be another cause, or a refinement of that one. Firefox 3.0.14 gives me "Permission denied to get property HTMLDocument.anchors" on approximately the 150th time of doing what seems to be essentially the same thing SOP? OAF. |
#16
| |||
| |||
|
|
As I explained, the innerText/textContent is not related to the frame; it is related to elements. An entry on getting frame's innerText/textContent implies that a frame has a property innerText/textContent. That would be false. |
#17
| |||
| |||
|
|
Garrett Smith wrote: Thomas 'PointedEars' Lahn wrote: Garrett Smith wrote: Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: iframe.contentDocument.body.textContent then. I remember to have posted that explanation before, but the FAQ had not been updated for some reason. The innerText/textContent is not related to the frame; its' related to elements. The frame is a window. The (i)frame window is represented by a Window instance; the `iframe' element is not (AISB). Apparently you still need to learn the difference between element objects and other host objects. For those who did not notice that I wrote "the frame", and not the IFRAME element. Assuming a document with an iframe: var f = document.getElementsByTagName("iframe")[0]; f.textContent; - will not get the text content inside the iframe's document. Of course not; it will get the (alternative) text content of the element node. Nobody has ever implied otherwise. f.contentDocument.body.textContent will (where available). Hopefully that clears up any potential ambiguity. Your evading the issue is unsuccessful. Just to remind you: Your justification for not adding this to the FAQ was that `textContent' "is not related to the frame", which is ridiculous. |
|
I see. Then why did you not suggest that <FAQENTRY> it should be included in the frame-content section (9.2) of the FAQ? |
#18
| ||||
| ||||
|
|
Thomas 'PointedEars' Lahn posted: Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: Dr J R Stockton wrote: I want to read as on disc, certainly; but my needs are substantially satisfied for TXT files by what innerText and innerHTML show, and for HTML files by what is actually revealed. It's annoying that Firefox seems to lack innerText of iframe content, It implements the `textContent' property instead, like any other browser standards-compliant in that regard. (Discussed here ad nauseam). I see. Then why did you not suggest that <FAQENTRY> it should be included in the frame-content section (9.2) of the FAQ? Because I do not think it is a frequently asked question. Then why did you not suggest that the section be removed? |
|
It's still annoying that one major browser lacks what others have (even if out of fashion), especially if the functionality is present. Which browser would that be? With a little more - with any - humility and/or common sense, you would read what you quote both before and after composing a reply. The answer to that question is plainly visible above, currently at the >>>> level. |
|
Matthew 7:7, Luke 11:9. Those verses, with their nexts, could be put in the FAQ as a sort of motto - safely, were it not for the TL effect. |
|
FAQENTRY> FAQ 9.7 : ISTM that there may be another cause, or a refinement of that one. Firefox 3.0.14 gives me "Permission denied to get property HTMLDocument.anchors" on approximately the 150th time of doing what seems to be essentially the same thing SOP? OAF. |
#19
| |||
| |||
|
|
Is this the issue I evaded? As I stated, textContent is not related to the frame; stating otherwise, as the proposal for section (9.2) "9.2 How do I access a frame's content?" would be misleading (counterproductive to FAQ goals). |
#20
| |||
| |||
|
|
Thomas 'PointedEars' Lahn wrote: Garrett Smith wrote: Thomas 'PointedEars' Lahn wrote: Garrett Smith wrote: Dr J R Stockton wrote: Thomas 'PointedEars' Lahn posted: iframe.contentDocument.body.textContent then. I remember to have posted that explanation before, but the FAQ had not been updated for some reason. The innerText/textContent is not related to the frame; its' related to elements. The frame is a window. The (i)frame window is represented by a Window instance; the `iframe' element is not (AISB). Apparently you still need to learn the difference between element objects and other host objects. For those who did not notice that I wrote "the frame", and not the IFRAME element. Assuming a document with an iframe: var f = document.getElementsByTagName("iframe")[0]; f.textContent; - will not get the text content inside the iframe's document. Of course not; it will get the (alternative) text content of the element node. Nobody has ever implied otherwise. f.contentDocument.body.textContent will (where available). Hopefully that clears up any potential ambiguity. Your evading the issue is unsuccessful. Just to remind you: Your justification for not adding this to the FAQ was that `textContent' "is not related to the frame", which is ridiculous. If you want to make a proposal, then do so. |
|
The proposal was: | I see. Then why did you not suggest that <FAQENTRY> it should be | included in the frame-content section (9.2) of the FAQ? Is this the issue I evaded? |
|
As I stated, textContent is not related to the frame; stating otherwise, as the proposal for section (9.2) "9.2 How do I access a frame's content?" would be misleading (counterproductive to FAQ goals). [...] |
![]() |
| Thread Tools | |
| Display Modes | |
| |