Custom App Connect components

@karh sorry for the late reply. Holidays got in the middle and I didn’t come to this thread again until myself had some questions about extending components.

I would go with a custom component, but it can get tricky as the documentation on them is scattered. I also reverse engineer App Connect a lot to fill some gaps. But still I run into roadblocks from time to time.

If it’s not a priority in your project I would postpone it until the team releases the feature.

@george @patrick I was playing with extending the components but it doesn’t work as I would expect. Extending a component doesn’t seem to expose the extended component methods(no inheritance).

Based on this feature request I tried to learn extending by implementing a custom component.

<script>
        dmx.Component("jonl-browser", {
        extends: "browser",
        methods: {
         reload: function () {
            location.reload();
         }
        }
    })
</script>

I would have expected that having the dmx-browser js file loaded on page I could trigger the alert() from the dmx-jonl-browser component but it seems I can’t.
So there is no actual inheritance, right? Then my doubt is what does the extends attribute work for?

If there is no inheritance, wouldn’t it make sense to refactor the code into JS classes from ES2015 in order to give us the possibility to extend and inherit?