Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Create a separate fn scope for each $ instance #43

Merged
merged 1 commit into from
Sep 18, 2014
Merged

Conversation

kpdecker
Copy link
Contributor

Defines a per-page $.fn instance that can be modified safely by pages without
causing their content to be retained or unexpected cross context $ operations.

Defines a per-page $.fn instance that can be modified safely by pages without causing their content to be retained or unexpected cross context $ operations.

The initial attempt at this was incorrect, thus the removal of the Object.create call.
@@ -12,8 +12,14 @@ module.exports = exports = function jQuery(window, html, exec, options) {
html = undefined;

function query(selector, context) {
/* jshint -W103 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this suppress?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of __proto__. Jshint does not like but it's in the spec as of ES6. Generally we don't want to use this since there is performance overhead.

@candid82
Copy link
Contributor

lgtm

kpdecker added a commit that referenced this pull request Sep 18, 2014
Create a separate fn scope for each $ instance
@kpdecker kpdecker merged commit 68f1ee0 into master Sep 18, 2014
@kpdecker kpdecker deleted the fn-scope branch September 18, 2014 18:24
@kpdecker
Copy link
Contributor Author

Released in 0.14.0

@kpdecker kpdecker modified the milestone: 1.0.0 Feb 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants