Opened 8 years ago
Last modified 5 years ago
#17300 assigned defect
safeMixin fails if source contains reference to window in different domain
Reported by: | jameyg | Owned by: | dylan |
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Documentation | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
safeMixin fails in Firefox if the source contains a reference to a window in a different domain. For example:
var a = { target : window.top }; var b = declare.safeMixin({}, a);
will fail if 'top' is in a different domain. This is do to the isFunction type check trigging a cross-domain access issue (currently only in FF..tested FF21).
If safeMixin is indirectly used in declare(), then this is easily worked around (this "defect" may just to be a documentation of the workaround...):
declare(null, { target: null, constructor: function(kwargs) { this.target = kwargs.target || window.top; } });
Change History (2)
comment:1 Changed 5 years ago by
Component: | Core → Documentation |
---|---|
Milestone: | tbd → 1.12 |
Owner: | set to dylan |
Status: | new → assigned |
comment:2 Changed 5 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Note: See
TracTickets for help on using
tickets.
Will update documentation as time permits. Or if you have time before I do, a pull request against https://github.com/dojo/docs/blob/master/dojo/_base/declare.rst would be appreciated.