notes and minr tweaking....

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-02-27 06:52:10 +03:00
parent fa61d33f67
commit b99a152175
2 changed files with 9 additions and 5 deletions

View File

@ -109,6 +109,7 @@ requirejs([
make('a'),
'b')
make('---')
// XXX not yet visible...
make('...')
make('e')
// embeded browser...

View File

@ -930,22 +930,25 @@ var BrowserPrototype = {
return null
}
// item shorthands...
// special-case: item shorthands...
if(item.value in options.elementShorthand){
var text = null
item = options.elementShorthand[item.value]
// NOTE: this is a bit of a cheat, but it saves us from either
// parsing or restricting the format...
var elem = $(item.html)[0]
elem.classList.add(...item['class'].split(/\s+/))
elem.classList.add(
...(item['class'] instanceof Array ?
item['class']
: item['class'].split(/\s+/g)))
return elem
}
// normal items...
// Base DOM...
var elem = document.createElement('div')
var text = JSON.stringify(item.value || item)
// classes...
elem.classList.add(...['item']
// user classes...