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
Tested in FF 38, stipped down version of my actual code.
Error Message:
TypeError: dialogueLink.fromXML is not a function
dialogueLink.fromXML();
Without the extends in this testcase it works.
In my actual code (https://github.com/Xaratas/PillarsOfEternity-Quest-Editor) i have build drag and drop, which creates DialogueLink elements via the constructor. These are created fully, and have all expected polymer properties and my functions.
I spotted the difference between my working Links from drag and drop and the links from my xml setup. In the drag and drop case i add the element to the dom.
I have a line for this below, but it still prints the error.
Other, non extends elements i create does not have to be added to the dom to call my functions, thats why i think this is a bug.
<!DOCTYPE html><html><head><scriptsrc="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script><linkrel="import" href="bower_components/polymer/polymer.html"></head><body><script></script><script>document.addEventListener('WebComponentsReady',function(){DialogueLink=Polymer({is: "dialogueLink-element",extends: "canvas",// comment out and it worksproperties: {randomWeight: Number,playQuestionNodeVO: Boolean,questionNodeTextDisplay: String,startElement: Object,endElement: Object},// ist vor dem Behavior dranfactoryImpl: function(startElement,endElement){this.startElement=startElement;this.endElement=endElement;},created: function(){console.log("created and prototype ready");},fromXML: function(xml){console.log("fromXML");}});vardialogueLink=newDialogueLink();// parameter doesnt really matter for this test// uncomment, and it will setup the canvas as polymer element, but in this function fromXML() would still "not exist"// document.getElementsByTagName("body")[0].appendChild(dialogueLink);dialogueLink.fromXML();});</script></body></html>
The text was updated successfully, but these errors were encountered:
The issue here is a CustomElements polyfill limitation. The createElement call fails if the extended element is created with an uppercase character in the name.
is: "dialogueLink-element", // make the `L` here lowercase and it'll work
Tested in FF 38, stipped down version of my actual code.
Error Message:
TypeError: dialogueLink.fromXML is not a function
dialogueLink.fromXML();
Without the extends in this testcase it works.
In my actual code (https://github.com/Xaratas/PillarsOfEternity-Quest-Editor) i have build drag and drop, which creates DialogueLink elements via the constructor. These are created fully, and have all expected polymer properties and my functions.
I spotted the difference between my working Links from drag and drop and the links from my xml setup. In the drag and drop case i add the element to the dom.
I have a line for this below, but it still prints the error.
Other, non extends elements i create does not have to be added to the dom to call my functions, thats why i think this is a bug.
The text was updated successfully, but these errors were encountered: