Temporarily changes an element's attributes.
The element's original attributes will be restored when whe preview ends.
This preview sets a temporary [app-loading=true]
attribute on the targeted fragment:
up.preview('loading-attr', function(preview) {
preview.setAttrs({ 'app-loading': true })
})
The element or selector to change.
If omitted, the targeted fragment will be changed.