Skip to main content

Search and Top Navigation

#14775 closed bug (notabug)

Opened November 03, 2015 07:17AM UTC

Closed November 03, 2015 01:04PM UTC

Last modified November 03, 2015 09:54PM UTC

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/

Attachments (0)
Change History (2)

Changed November 03, 2015 01:04PM UTC by scottgonzalez comment:1

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.

Changed November 03, 2015 09:54PM UTC by gtournie comment:2

Replying to [comment:1 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 ; )