Questions tagged [oojs]

5 questions
1
vote
1 answer

Is there a way to destructure return value from Class methods in JavaScript

I'm trying to destructure return values of a Class instance method. Condider the snippet below //define class of birds class Birds { //save each bird name constructor(birdName, birdType = "Not Stated", canYouFly = true) { this.birdName =…
opeolluwa
  • 96
  • 8
0
votes
1 answer

How to get data from OO.ui.DropdownWidget?

Given a ui with drowpdown menus built with OO.ui allowing to select human languages associated with their Wikidata value : languagesA = new OO.ui.DropdownWidget({ id: 'lqg-languagesA', label: 'Source language', menu: { items:…
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
0
votes
1 answer

How to call custom function asynchronously using javascript?

I am using one angular third party module in my application. That module is providing some call-back methods like login success, failure etc, and I am executing my custom scripts inside the call-back method. But the issue here is I want to execute…
prisel
  • 337
  • 2
  • 14
0
votes
1 answer

Uncaught TypeError is not a function class method

I am new to JavaScript, and I am getting this error: Uncaught TypeError: this.move is not a function SO won't let me post if my question is mostly code, so here's a link the the file in…
Thaddaeus Markle
  • 434
  • 1
  • 4
  • 12
0
votes
1 answer

Object.create vs .prototype

(Please close IF duplicate) Given the following scenario: function Person(first, last) { this.name = { first, last }; }; Person.prototype.greeting = function() { console.log('Hi! I\'m ' + this.name.first + '.'); }; function…
Patricio Vargas
  • 5,236
  • 11
  • 49
  • 100