_finishDistribute in the experimental patch-dom

13 views
Skip to first unread message

stiv...@gmail.com

unread,
Dec 8, 2016, 6:08:56 PM12/8/16
to Polymer
Hello, I'm trying to use the experimental "patch-dom", but I came across an small problem(The patch does seem to work though):

There is an exception  throwed by the use of it :

TypeError: Illegal invocation
    at TemplateInstance.Polymer.Base._finishDistribute (VM118 patch-dom.html:48)
    at TemplateInstance._readyClients (VM68 ready.html:127)
    at TemplateInstance._ready (VM68 ready.html:107)
    at TemplateInstance._tryReady (VM68 ready.html:93)
    at TemplateInstance._constructorImpl (VM111 templatizer.html:377)
    at new TemplateInstance (VM111 templatizer.html:132)
    at HTMLTemplateElement.stamp (VM111 templatizer.html:431)
    at HTMLTemplateElement._ensureInstance (VM116 dom-if.html:128)
    at HTMLTemplateElement._render (VM116 dom-if.html:108)
    at Debouncer.complete (VM83 debounce.html:53)

A code reproducing this problem could be found in here:
http://jsbin.com/qawevemaqe/edit?html,output

Debugging the exception, it does fail on an element of type TemplateInstance, in which_the useContent property is undefined and firstChild property throws the exception described above.

Reviewing the code, I've found that the _finishDistribute in polymer.mini(https://github.com/Polymer/polymer/blob/master/src/mini/shady.html) does have a validation for its execution:

if (this._useContent) => process shady dom, else => It does nothing.

The patch doesn't use the _useContent variable at all, might it be lacking of the check of the _useContent variable before of executing anything?

I'm not sure if this must be reported as an issue on github as it is an experimental feature.

Thank you in advance.
Reply all
Reply to author
Forward
0 new messages