I know this might sound basic for you, but am getting this error again & again, please can anyone help?
var Test = pc.createScript('test');
Test.attributes.add('html', {
type: 'asset',
assetType: 'html',
title: 'HTML Asset'
});
Test.prototype.initialize = function() {
this.element = document.createElement('buttn');
this.element.classList.add('container');
document.body.appendChild(this.element);
};
Test.prototype.bindEvents = function() {
var buttn = this.element.querySelector('.buttn');
var imag = this.app.root.element.querySelector('.imag').getPosition();
};
Test.prototype.update = function(dt) {
};
Html code
<img class='imag' src="/Images/Annotation"/>
<button class ='buttn' onclick="picture()">Click me!</button>