Closed Bug 192891 Opened 22 years ago Closed 19 years ago

Changing "data" property of "object" node in JavaScript does nothing.

Categories

(Core Graveyard :: Plug-ins, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: niall, Assigned: peterlubczynski-bugs)

References

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212 I am using the OBJECT tag to perform a client side include of HTML (in preference to IFRAME, as I want it the HTML included inline). The initial page load works, however when I change the data property of the OBJECT node using JavaScript nothing happens. I have attached a simplified test case (for image/gif instead of text/html). Reproducible: Always Steps to Reproduce:
Attached file Test case.
Demonstrates how changing the "data" attribute of an "OBJECT" node doesn't do anything.
To plug-ins. We need to observe changes to "data" and reinstantiate the plugin/image (either by reframing or within the existing frame).
Assignee: jst → peterlubczynski
Status: UNCONFIRMED → NEW
Component: DOM Level 0 → Plug-ins
Ever confirmed: true
OS: Windows XP → All
QA Contact: ashishbhatt → shrir
Hardware: PC → All
This is very similar to bug 95548 which is about chagning the TYPE attribute. The current workaround for this is to remove the old node before attaching the new one.
Priority: -- → P4
Target Milestone: --- → Future
Peter, Can you explain the workaround in more detail? Should I delete the OBJECT node from the DOM and create a new one?
yes I think you can also set CSS display:none (which currently destroys the plugin instance), change attributes as needed, then go back to display:inline, for example, to restart the plugin. Changing the display type of a plugin has the nasty side effect of restarting it, see bug 90268.
Attached file Workaround
Demonstrates a workaround
The suggested workaround does indeed work - thanks for the suggestion. BTW - would the proper fix for this work along the same lines, i.e., recreate the object node when the data property is changed or would it be better to reload the object when possible from a performance/memory point of view?
*** Bug 195679 has been marked as a duplicate of this bug. ***
The mentioned workaround does not work for me any more. It does work in 1.7 Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7) Gecko/20040618 but not in a current trunk build Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8a3) Gecko/20040830
Attached file new workaround
Attachment #193057 - Attachment description: new workaround → new workaround Works with trunk builds too.
Comment on attachment 193057 [details] new workaround Works with trunk builds too.
Attachment #193057 - Attachment description: new workaround Works with trunk builds too. → new workaround
Depends on: 1156
*** Bug 212700 has been marked as a duplicate of this bug. ***
fixed by bug 1156, although it needs more testing.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: