Skip to content

Make jQuery Optional #11631

@sandstrom

Description

@sandstrom

I use jQuery heavily and like it for many reasons! But decoupling it from Ember – making it optional – would be a good idea (as long as the core-team support this).

I've tried to track down the places where it's used and it's implications. There are some primary usage (around events) as well as some auxiliary usage (where it should be fairly easy to replace it, I hope).

Primary use (will require insight from people with good knowledge of browser difference)

  • For event dispatching (code)
  • Have I missed something?

Auxiliary use (these should be easier to replace)

  • basic DOM-operations for bootstrap (code)
  • Firefox 11 and outerHTML[1]. Is this still needed? Firefox is on v38 now. (code)
  • #findElementInParentElement (code)
  • #replaceIn (code)
  • #appendTo (code)
  • event listening for location changes and a DOM-lookup (code)
  • getElementById lookup (code)

Library and access (these should remain even if the library is optional, with a friendly message if jQuery is not present)


Please add to the list if I've missed something.

Since jQuery is good at patching over browser-difference, care must be taken to understand where it's being relied on for this.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions