Closed Bug 428946 Opened 16 years ago Closed 6 years ago

No scriptable helpers for XPCWrappedNative HTML Form element?

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: axel, Unassigned)

References

(Depends on 1 open bug, )

Details

I tried the following from chrome:// code on a html http:// doc loaded in a <browser>:

    var forms = this.browser.contentDocument.forms;
    var action = this.actions.pop(); // string
    var msg = document.getElementById('msg_' + action).value;
    for each (var form in forms) {
      if (action in form) {
        form[action].value = msg;
        return true;
      }
    }

This looks like the scriptable helpers stuff wouldn't be exposed on the XPCNativeWrapped of the html form element I get.
It would be helpful if you could say exactly what doesn't work here!

Are the properties not enumerated, or enumerated and don't work?  Are there errors?  Do other scriptable helpers work (not on <form>)?

If you would prefer, as I would prefer, your answer could take the form of the body of a mochitest. :)
So this is a documented limitation, I'd say that the combo of http://developer.mozilla.org/en/docs/Safely_accessing_content_DOM_from_chrome#Direct_access and http://developer.mozilla.org/en/docs/XPCNativeWrapper#Limitations_of_XPCNativeWrapper mentions all the cases, including the form ones.

Found those docs while reading up on mochitest and chrome test, and trying to figure out which I need to get wrappers.

Would adding scriptable helpers to the safe content be an RFE, or merely WONTFIX?
Sounds like a reasonable RFE to me -- they're safe to access as long as we don't let script override them, which sounds like exactly what XPCNW are supposed to provide.
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
This works with Xrays to webidl bindings, as much as we want it to work.
Depends on: ParisBindings
Resolution: INACTIVE → FIXED
You need to log in before you can comment on or make changes to this bug.