How to get jQuery interface to work with Firefox extension

I tried interacting with the jquery and jquery ui communities (email list, irc), in addition to Google and more experienced staff, but nothing turned out to be fruitful. I found stackoverflow useful in the past, so maybe someone will come across this before.

My problem is this: I want to include jQuery UI in the extension.

This is not as simple as in self-serving page scripts, because I need to provide a specific context for ui widgets.

jQuery can be initialized with a specific context. The jQuery user interface cannot. Thus, I wrapped the UI code with a function that accepts a properly contextualized jQuery instance.

PROBLEM: whenever the user interface code creates a jQuery instance, for example $ (""), this.element is overwritten as the new element created.

this.element should be, for example, a slider div. When initializing a widget slider creates a handle to a handle, that element should still be a slider, not a handle .... adding a handle to itself correctly causes an error.

"this" in widgets can be messed up ... jQuery UI or jQuery can refer to themselves directly somewhere, and thus the contextualized jQuery that I provide is not used everywhere ... jQuery UI may not be recidivist or something like that ... I have no idea.

, . ... , .

, jQuery UI,   http://groups.google.com/group/jquery-ui/browse_thread/thread/a79537053acff3f8

ps - , . ? , . , , ? DatePicker?

+3

Source: https://habr.com/ru/post/1724358/


All Articles