Merge remote-tracking branch 'origin/rewrite' into rewrite
This commit is contained in:
commit
499a9ccc6d
5 changed files with 127 additions and 48 deletions
|
|
@ -70,8 +70,8 @@ module.exports = function($window) {
|
|||
var is = attrs && attrs.is
|
||||
|
||||
var element = ns ?
|
||||
is ? $doc.createElementNS(ns, tag, is) : $doc.createElementNS(ns, tag) :
|
||||
is ? $doc.createElement(tag, is) : $doc.createElement(tag)
|
||||
is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
|
||||
is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
|
||||
vnode.dom = element
|
||||
|
||||
if (attrs != null) {
|
||||
|
|
@ -441,11 +441,11 @@ module.exports = function($window) {
|
|||
|
||||
//style
|
||||
function updateStyle(element, old, style) {
|
||||
if (old === style) element.cssText = "", old = null
|
||||
if (style == null) element.cssText = ""
|
||||
else if (typeof style === "string") element.cssText = style
|
||||
if (old === style) element.style.cssText = "", old = null
|
||||
if (style == null) element.style.cssText = ""
|
||||
else if (typeof style === "string") element.style.cssText = style
|
||||
else {
|
||||
if (typeof old === "string") element.cssText = ""
|
||||
if (typeof old === "string") element.style.cssText = ""
|
||||
for (var key in style) {
|
||||
element.style[key] = style[key]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue