This feature is experimental. It may be changed or removed in a future version without prior notice or deprecation.
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:
element = document.createElement('span') element.className = 'klass' selector = up.element.toSelector(element) // returns '.klass'