Returns a CSS selector that matches the given element as good as possible.
To build the selector, the following element properties are used in decreasing order of priority:
[up-id]
attribute[id]
attribute[name]
attribute[class]
names, ignoring up.fragment.config.badTargetClasses
.element = up.element.createFromHTML('<span class="klass">...</span>')
selector = up.fragment.toTarget(element) // returns '.klass'
The element for which to create a selector.