Questions tagged as 'javascript'

1
answer

How to communicate tabs with an extension / add-on and store the variables?

I want to be able to communicate tabs with an extension and store values in variables and share these values between tabs, how can I do this?    Note: This is a tutorial question, read more at:       Can I answer my own question? Help...
asked by 27.12.2017 / 16:54
1
answer

Why does not Lookbehind exist in JavaScript?

I found out that there is no group construct lookbehind in Regex's made in JavaScript so I had some questions like: Why does not it exist? Home Is there any reason that makes it incompatible with language or unnecessary? If it is unneces...
asked by 25.05.2017 / 19:19
1
answer

Removing a DOM element also removes your listening?

I already know about the Dirt Collector feature. My question is regarding this resource for addEventListener . Example test.addEventListener('mouseover', function(){ test.className = 'active'; }); test.addEventListener...
asked by 29.10.2017 / 14:58
5
answers

Get clicked item position

I have a list with registered items and one of the attributes of this item is a button to delete that item. By clicking on the button I want to know the position of the line clicked inside the list. When I know the position, I'll delete th...
asked by 01.11.2017 / 19:41
2
answers

What is the most efficient way to implement GroupBy in Javascript?

I'm trying to implement a GroupBy with these parameters function GroupBy(keySelector, elementSelector, comparer) { // keySelector = function(e) { return e.ID } // elementSelector = function(e) { return e.Name } // comparer =...
asked by 17.12.2013 / 13:56
1
answer

How does a function run automatically without being called?

I can create a function in JavaScript and call it as follows: funcaoTeste = function() { console.log('Ola funcao teste'); }; funcaoTeste(); To execute the function I need to call it funcaoTeste() , entertaining, somet...
asked by 01.04.2017 / 22:55
1
answer

+ sign before the function in JQuery? what does it mean? [duplicate]

I'm going to finish a system started by another colleague who was disconnected from the company and I'm in doubt about using + before starting the function, and I would like to know what the impact of this assignment is, +function ($)...
asked by 28.09.2017 / 14:10
1
answer

Question about inserting a Javascript Object

Context I'm trying to persist in the database of a purchase, as well as all of its items. For this I am using a .jsp file. But I need to send the web page data. Purchasing data is easy. The problem is in the items of the same, I wanted...
asked by 05.02.2017 / 07:09
1
answer

How do I add customElements support for Opera 12?

I'm working with customElements, but I've been having a problem with Opera 12. So far the best I've been was to use x-tags but the same as only support document.register and this differs slightly from the W3C API , another drawback...
asked by 31.01.2014 / 06:08
1
answer

Performance on Javascript objects

Through what medium do you get the best performance of Javascript objects. var Objeto = { propriedade:'valorPropriedade', init:function() { //Inicia Objetos } } var obj = Objeto.init(); or: function Objeto() { thi...
asked by 27.02.2014 / 01:30