Build system modernised.
- Array#contains and String#contains (use standard #includes method).
- O.extend, Function#extend, Function#implement
- Number#limit, #mod replaced with Math module.
- RegExp.url, .email moved to module.
- Object#keyOf, #filter, #zip, #fromQueryString moved to KeyValue module.
- Object#toCSSString moved to O.Element.cssStringFromKeyValue.
- O.Parse moved to O.parse.ParseResult
- O.Parse.* moved to O.parse.*
- O.parse.date etc. moved to O.parsedate.*
- 2017-12-06: added
resistHiding
toO.PopOverView#show
options - 2017-12-06: changed
O.View#allowTextSelection
to support and default to null (mostly harmless, but will change some behaviour). - 2017-11-28: allow objects to determine their own guid
- 2017-11-22: changed keyboard shortcuts to use the newer
event.key
API, which reflects the logical model rather than the physical model ofkeyCode
; this entails some fairly significant changes; notably,shift-j
must becomeJ
; other examples of changes:ctrl-esc
becomesCtrl-Escape
,up
ArrowUp
andcmd-q
Cmd-q
. (Note that shortcuts using the arrow keys will be broken on Firefox 36 and earlier which useUp
instead ofArrowUp
.) - 2017-11-11: added
O.Record#getData
O.Promise
, a subclass of the nativePromise
which executes theonFulfilled
andonRejected
functions in the run loop, viaO.RunLoop.invoke
, ensuring that promises won’t produce surprising behaviour.
- The global
Promise
is overridden to set it toO.Promise
. This is convenient, probably harmless and makesasync function
Overture-ready—not that native browser support is yet wide! O.RunLoop.invoke
now returns the return value of the function, rather thanRunLoop
. (But bear in mind that the run loop queues will be flushed between the completion of the function and the return of that value, so if caution is not exercised that value could be stale.)- Functions wrapped in the run loop via
Function#invokeInRunLoop
will now return the value returned by the wrapped function, notundefined
.
Queries were refactored quite a bit to make more sense, with some renamings and some mild changes in behaviour.
- Renamed
RemoteQuery
toQuery
. - Renamed
WindowedRemoteQuery
toWindowedQuery
. - Renamed
LiveQuery
toLocalQuery
. - Renamed
Query#refresh
toQuery#fetch
. (It also now takes an optional extra argument, callback.) - Renamed
Record#refresh
toRecord#fetch
. - Renamed
Store#getAllRemoteQueries
toStore#getAllQueries
. LocalQuery
is now a subclass ofQuery
rather than ofO.Object
.- There are a handful of internal implementation details that changed (keywords of some methods introduced or changed: monitorForChanges, unmonitorForChanges, reset, getStoreKeys, sourceDidFetchQuery, typeStatusChanged, storeDidChangeRecords).
- Removed now-unnecessary methods
Store#setRemoteQueriesObsolete
,Store#refreshLiveQueries
andStore#liveQueriesAreReady
. - Renamed
Query#filter
toQuery#where
, to fix the collision on theEnumerable.filter
method. - New property
Query#autoRefresh
, controlling the eponymous behaviour on the query, defaulting toAUTO_REFRESH_NEVER
onQuery
andAUTO_REFRESH_ALWAYS
onLocalQuery
. (These are the same semantics as were previously present, but it gives the flexibility to change it.) - New static properties
RemoteQuery.AUTO_REFRESH_NEVER
,RemoteQuery.AUTO_REFRESH_IF_OBSERVED
andRemoteQuery.AUTO_REFRESH_ALWAYS
forQuery#autoRefresh
.
- Observable property
Store#typeToStatus
. (Formerly it was a private, unobservable property named_typeToStatus
.) - New method
Store#getRecordFromStoreKey
, replacing a common pattern ofStore#getRecord
usage. - Support for unordered
toMany
attribute. (Represented as object with{ id1: true, id2: true }
instead of[ id1, id2 ]
.)
-
Support for building via npm. Now,
npm install
oryarn
will makebuild/Overture.js
, which is the main entry point for the Node module, andbuild/Loader.js
.The makefile is still around, but frankly it’s not very useful, because doc building is progressively becoming more broken and the minification isn’t what we need any more. It’ll disappear eventually. (Note also the difference in filenames: the makefile produces Overture-raw.js and Overture-‹HASH›.js, the node package produces just Overture.js.)
- Recommendation: in constructor super calls such as
Foo.parent.init.call( this, … )
, changeinit
toconstructor
for easy forwards compatibility with ES6 classes.
-
Deprecated
O.Element.addClass
,O.Element.removeClass
andO.Element.hasClass
, in favour of the now well-supported†Element.classList
API:addClass( el, className )
→el.classList.add( className )
removeClass( el, className )
→el.classList.remove( className )
hasClass( el, className )
→el.classList.contains( className )
Element.classList is a read-only property, so it’s OK to store the classList in your object instead of always writing
el.classList.add
.Note that the
classList
API will throw exceptions if you pass class name containing spaces, whereas the oldO.Element.*Class
API would either work or fail silently. The deprecated methods have actually changed to use classList directly, so they will now fail in such cases.(† I say “well supported”, but IE 11 actually doesn’t implement classList on SVG elements. If this matters to you, get a polyfill like https://github.com/eligrey/classList.js.)
- O.ViewEventsController.getViewFromNode moved to O.getViewFromNode
- O.activeViews
- O.ViewEventsController.{registerActiveView, deregisterActiveView}
-
Support for IE8–10 dropped. IE11 is the lowest base browser now.
(At the time of the change, Overture actually worked in IE 10 with core-js, but this is not a supported configuration.)
-
Overture itself is also starting to use certain newer browser features; to support anything but the latest versions of browsers, Overture users are expected to load core-js before loading Overture.
Object.values
is recommended as a value to check for to determine whether core-js is needed: it will be needed by IE 11, Safari ≤ 10.0, iOS ≤ 10.2, Chrome ≤ 53, Firefox ≤ 46 and Edge ≤ ?13, but the latest versions of browsers don’t need it. -
The code changed from using a custom build process to using Rollup; the complete code must now be generated with
make compile
, which will createbuild/Overture-raw.js
andbuild/Loader-raw.js
. (Commands likemake build/Overture-raw.js
are also fine.)The old custom build process is still around for anything that already used it, but it should be considered deprecated.
No changelogs maintained.