Close #753.
This commit is contained in:
parent
1d267e0541
commit
9329c7ce6e
@ -402,11 +402,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addStyle: function(css) {
|
addStyle: function(css) {
|
||||||
var style;
|
var f, style;
|
||||||
style = $.el('style', {
|
style = $.el('style', {
|
||||||
textContent: css
|
textContent: css
|
||||||
});
|
});
|
||||||
$.add(d.head || d.documentElement, style);
|
f = function() {
|
||||||
|
var root;
|
||||||
|
if (root = d.head || d.documentElement) {
|
||||||
|
return $.add(root, style);
|
||||||
|
} else {
|
||||||
|
return setTimeout(f, 20);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
f();
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
x: function(path, root) {
|
x: function(path, root) {
|
||||||
|
|||||||
@ -315,8 +315,16 @@ $.extend $,
|
|||||||
addStyle: (css) ->
|
addStyle: (css) ->
|
||||||
style = $.el 'style',
|
style = $.el 'style',
|
||||||
textContent: css
|
textContent: css
|
||||||
# XXX Only Chrome has no d.head on document-start.
|
# That's terrible.
|
||||||
$.add d.head or d.documentElement, style
|
# XXX tmp fix for scriptish:
|
||||||
|
# https://github.com/scriptish/scriptish/issues/16
|
||||||
|
f = ->
|
||||||
|
# XXX Only Chrome has no d.head on document-start.
|
||||||
|
if root = d.head or d.documentElement
|
||||||
|
$.add root, style
|
||||||
|
else
|
||||||
|
setTimeout f, 20
|
||||||
|
f()
|
||||||
style
|
style
|
||||||
x: (path, root=d.body) ->
|
x: (path, root=d.body) ->
|
||||||
# XPathResult.ANY_UNORDERED_NODE_TYPE is 8
|
# XPathResult.ANY_UNORDERED_NODE_TYPE is 8
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user