Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 269285 - [Browser] BrowserFunctions should probably be scoped per-frame
Summary: [Browser] BrowserFunctions should probably be scoped per-frame
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 16:37 EDT by Grant Gayed CLA
Modified: 2019-11-30 19:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2009-03-18 16:37:36 EDT
On a page with frames, a registered BrowserFunction needs to be accessed with prefix "parent" (eg.- parent.doit(...)) because these functions are only scoped on the top frame's window.

This is probably not the right behaviour (need to think about this), it probably makes sense that a registered function would be equally accessible to all frames without requiring them to reference their parent or top frame.
Comment 1 Grant Gayed CLA 2009-03-20 13:54:43 EDT
This is mostly fixed > 20090320.  The case that is not currently handled is frames whose contents come from a different domain than the top-level document, due to permissions problems.  Keeping report open to consider this case.
Comment 2 Christopher Deckers CLA 2009-03-20 14:34:21 EDT
> This is mostly fixed > 20090320.

Good news!

> The case that is not currently handled is
> frames whose contents come from a different domain than the top-level document,
> due to permissions problems.

I see that as a limitation (frameset injected with a setText, but frames coming from 3rd party providers, mashups, etc).
What permission problems do you see to not provide this to every frame? In my opinion, the point of this API is to make the container visible.

If you think permissions are a problem, then it is the role of the container to grant/reject the function call. Thus, you may consider fixing the BrowserFunction API before it gets in the final 3.5 release, with something like:

public Object function (Object[] arguments, boolean isTopFrameDomain);
Comment 3 Grant Gayed CLA 2009-03-20 16:03:32 EDT
The permissions issue is being imposed by the native browsers, not a BrowserFunction design decision.  With some investigation it can hopefully be worked around.
Comment 4 Eclipse Genie CLA 2019-11-30 19:50:00 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.