|
322 | 322 | return attr("css", (str(attr("css")(el)) + " " + d).trim())(el); |
323 | 323 | }); |
324 | 324 | var node = next(el); |
325 | | - return node && node.state ? features.map(key("body")).map(function(d) { |
| 325 | + return node && node.state ? (features.map(key("body")).map(function(d) { |
326 | 326 | return d.call(node.shadowRoot || node, node.state); |
327 | | - }) : void 0; |
| 327 | + }), node) : void 0; |
328 | 328 | }; |
329 | 329 | }; |
330 | 330 | }, log = window.log("[ri/features]"); |
|
347 | 347 | }, parse = function(res) { |
348 | 348 | return res.body = fn(res.body), res; |
349 | 349 | }, log = window.log("[ri/types/fn]"), to = function(res) { |
350 | | - return res.body = str(res.body), res; |
| 350 | + return res.value = str(res.value), res; |
351 | 351 | }; |
352 | 352 | }, {} ], |
353 | 353 | 12: [ function(require, module, exports) { |
|
448 | 448 | return function(host) { |
449 | 449 | var styles, css = str(attr(host, "css")).split(" ").filter(Boolean), root = host.shadowRoot || host, head = document.head, shadow = head.createShadowRoot && host.shadowRoot; |
450 | 450 | if (!css.length) return next(host); |
451 | | - if (!css.some(not(is.in(ripple.resources)))) return styles = css.map(from(ripple.resources)).map(key("body")).map(shadow ? identity : transform(css)), |
452 | | - css.map(function(d) { |
| 451 | + if (!css.some(not(is.in(ripple.resources)))) return styles = css.map(from(ripple.resources)).map(function(d) { |
| 452 | + return d.body; |
| 453 | + }).map(shadow ? identity : transform(css)), css.map(function(d) { |
453 | 454 | return raw('style[resource="' + d + '"]', shadow ? root : head) || el("style[resource=" + d + "]"); |
454 | | - }).map(key("innerHTML", function(d, i) { |
455 | | - return styles[i]; |
456 | | - })).filter(not(by("parentNode"))).map(function(d) { |
| 455 | + }).map(function(d, i) { |
| 456 | + return d.innerHTML = styles[i], d; |
| 457 | + }).filter(not(by("parentNode"))).map(function(d) { |
457 | 458 | return shadow ? root.insertBefore(d, root.firstChild) : head.appendChild(d); |
458 | 459 | }), next(host); |
459 | 460 | }; |
|
0 commit comments