Releases: edemaine/furls
Releases Β· edemaine/furls
v0.11.0
- New default
'auto'
history mode reduces events from textboxes by pushing the URL only when deviating from a "committed" version of a textbox (when losing focus) [https://github.com/edemaine/font-webapp/issues/3] - Fix loading with default values: Using the browser back button to return to a past state that changed an input back to its default value didn't correctly set the value before decoding. This was notable in
rot
coding in fonts.
Full Changelog: v0.10.0...v0.11.0
v0.10.0
- New
configInput
method for easier (and chained) input configurationaddInput
falls back toconfigInput
if the input already exists, instead of doubly tracking
- Allow custom encoders/decoders to depend on other non-custom inputs, by loading non-custom inputs first.
- Optional ROT47 (controlled by a checkbox) example in README
Full Changelog: v0.9.0...v0.10.0
v0.9.0
- Support for
<select>
and<option>
s as inputs (#5)<select multiple>
get array values, while single<select>
s get a single valueaddInputs()
adds all<select>
s by default (in addition to all<input>
s and<textarea>
s)
- Breaking API change:
getInputValue
,getInputDefaultValue
, andsetInputValue
all now take input objects, instead of DOM objects.
Full Changelog: v0.8.1...v0.9.0
v0.8.1
type=range
inputs now have their values parsed into numbers, liketype=number
inputs. This helps font-webapp sliders.
Full Changelog: v0.8.0...v0.8.1
v0.8.0
- Custom URL encoding supported at the per-input level (#6). You can add
encode
anddecode
methods to an input via initialaddInput
, or by setting them on the object returned fromfindInput
. - Inputs can be marked minor to encourage
replaceState
behavior when they change. You can similarly add theminor
attribute viaaddInput
orfindInput
. - Expose internal helper methods:
getParameterByName
,getInputValue
,getInputDefaultValue
,setInputValue
,queueMicrotask
. This enables overriding behavior more, and I had need of manualgetParameterByName
.
Full Changelog: v0.7.0...v0.8.0
v0.7.0
- Important bug fix: Trigger
inputChange
events and thusclass
synchronization from browser navigation (popstate
event). Previously,inputChange
events weren't triggered and classes weren't synchronized. If you're usingsyncClass
, you should update. - If the inputs are changed back to the defaults, the URL no longer gets a trailing
?
- Use
queueMicrotask
instead ofsetTimeout
when available. This should prevent the browser from painting in between class updates and triggeringstateChange
. - Fix manual
loadURL
given a string without a search component. - Document
loadURL
event.
Full Changelog: v0.6.1...v0.7.0
v0.6.1
- Fix default value support for
type=number
inputs. (Resulted in URLs that included default values.)
Full Changelog: v0.6.0...v0.6.1
v0.6.0
- Automatically parse
type=number
inputs into Number (previously was String, as in DOM) - Add
get()
convenience function to match existingset()
- Switch from
document.location
to more canonicalwindow.location
Full Changelog: v0.5.0...v0.6.0
v0.5.0
- New
syncClass
feature for synchronizing classes with state. Use this to automatically add/remove classes according to checkbox or radio button statre. - Add support for removing specific inputs via
removeElement
/removeElements
. Sometimes it's easier to add all inputs and then remove ones you don't want to track. - API now exposes
getInputEvents
in case user wants to override which events to listen to. - Furls input objects now have a
type
field, making it easier to distinguish different sorts of inputs/textareas. - Prevent namespace leakage:
window
no longer gets polluted withgetParameterByName
,getInputValue
,getDefaultInputValue
,setInputValue
,getInputEvents
.