Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14775 closed bug (notabug)

ui widget - cannot pass localStorage as an option

Reported by: gtournie Owned by:
Priority: minor Milestone: none
Component: ui.widget Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

On Safari 9 (MAC os), when I pass window.localStorage as an option, it's converted into a simple Object, I don't have access to the setItem, getItem... methods.

http://jsfiddle.net/rpds51Ld/1/

Change History (2)

comment:1 Changed 7 years ago by Scott González

Component: ui.coreui.widget
Resolution: notabug
Status: newclosed

That's because we do deep merging of objects. This is not something we're interested in supporting. If you want to provide configurable storage, you should probably just expose functions as options, e.g., a getter and a setter, or a combined getter/setter.

comment:2 in reply to:  1 Changed 7 years ago by gtournie

Replying to scott.gonzalez:

That's because we do deep merging of objects. This is not something we're interested in supporting. If you want to provide configurable storage, you should probably just expose functions as options, e.g., a getter and a setter, or a combined getter/setter.

Exposing a getter/setter is not something I'm interested in supporting. So.. I'm not going to use the widget factory ; )

Note: See TracTickets for help on using tickets.