When I reach the console.log() its returning window.
How can I get the element under consideration?
let builder = function(){
this.box = $(`<div id="box" class="box">`);
this.inputcontainer = $(`<div id="inputcontainer" class="inputcontainer">`).appendTo(this.box);
this.textarea = $(`<textarea id="textarea"></textarea>`).appendTo(this.inputcontainer);
this.textarea.on("change keyup keydown input paste", this.postmsg);
this.chat.appendTo($('body'));
}
//someothercode
builder.prototype.postmsg = (e) => {
console.log(this); // returns window when i need it to be referencing textarea
}
let instance = new builder();
builder.prototype.postmsg = function(e){
console.log(this.textarea);
}
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
The following are two methods of building a link that has the sole purpose of running JavaScript codeWhich is better, in terms of functionality, page load speed, validation purposes, etc
I am using Angular 4 as my frontend and Laravel 55 as my restful API
I need to use imacros to reload recaptcha frame in this image to load new captcha, everyone, plz help: Link to the captcha: https://wwwmytrainerrewards
i am having the following problemI am trying to do this but it is not working: