mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
zjquery: Add $.create() method.
This commit add $.create(), which allows you to create a
jQuery object that just has a name to identify it, as opposed
to some selector or HTML fragment. It's useful for things that
are really used as stubs.
This also fixes a bunch of the existing tests to use $.create().
Before this fix, you could actually just do $('some-stub'), but
now we enforce that the input to $() looks like a valid selector
or HTML fragment, and we make some exceptions for things like
window-stub and document-stub.
This commit is contained in:
@@ -9,7 +9,7 @@ var with_overrides = global.with_overrides;
|
||||
var people = global.people;
|
||||
|
||||
set_global('$', global.make_zjquery());
|
||||
set_global('document', '');
|
||||
set_global('document', 'document-stub');
|
||||
|
||||
set_global('alert_words', {
|
||||
process_message: noop,
|
||||
|
||||
Reference in New Issue
Block a user