You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling .content with another DOM::Tiny object works if you create one using .parse method, but seems to crash due to modification of immutable DOM::Tiny if you create one using the .at method:
2017.10.3 zoffix@VirtualBox~$ perl6 -MDOM::Tiny -e 'with DOM::Tiny.parse: "<foo><bar>meow</bar></foo>" { for .find("foo") { .content: DOM::Tiny.parse: "meow" }; say ~$_ };'
<foo>meow</foo>
2017.10.3 zoffix@VirtualBox~$ perl6 -MDOM::Tiny -e 'with DOM::Tiny.parse: "<foo><bar>meow</bar></foo>" { for .find("foo") { .content: DOM::Tiny.parse("<b>meow</b>").at: "b" }; say ~$_ };'
Cannot modify an immutable DOM::Tiny
in sub _link at /home/zoffix/.rakudobrew/moar-master/install/share/perl6/site/sources/C389645DC4FF96E58E0EB64B8ABD2EE318524B63 (DOM::Tiny) line 1156
in block at /home/zoffix/.rakudobrew/moar-master/install/share/perl6/site/sources/C389645DC4FF96E58E0EB64B8ABD2EE318524B63 (DOM::Tiny) line 946
in method content at /home/zoffix/.rakudobrew/moar-master/install/share/perl6/site/sources/C389645DC4FF96E58E0EB64B8ABD2EE318524B63 (DOM::Tiny) line 944
in block at -e line 1
in block <unit> at -e line 1
2017.10.3 zoffix@VirtualBox~$ perl6 -MDOM::Tiny -e 'with DOM::Tiny.parse: "<foo><bar>meow</bar></foo>" { for .find("foo") { .content: ~DOM::Tiny.parse("<b>meow</b>").at: "b" }; say ~$_ };'
<foo><b>meow</b></foo>
The text was updated successfully, but these errors were encountered:
Calling
.contentwith another DOM::Tiny object works if you create one using.parsemethod, but seems to crash due to modification of immutable DOM::Tiny if you create one using the.atmethod:The text was updated successfully, but these errors were encountered: