Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE Compatability View error on createDocumentFragment "originalFunction()" #2085

Closed
mmcs85 opened this issue Jun 29, 2016 · 1 comment
Closed

Comments

@mmcs85
Copy link

mmcs85 commented Jun 29, 2016

Hi,

When using IE in Compatability view (enterprise intranet) with a added hostname, ko.utils.ieVersion is 7. Resulting on the fallowing error "Invalid object call" on the instruction:

var newDocFrag = originalFunction(),

On the fallowing piece of code:

document.createDocumentFragment = (function(originalFunction) { return function() { var newDocFrag = originalFunction(), allComponents = ko.components._allRegisteredComponents; for (var componentName in allComponents) { if (allComponents.hasOwnProperty(componentName)) { newDocFrag.createElement(componentName); } } return newDocFrag; }; })(document.createDocumentFragment);

I think the scope object must be document.

Possible solution would be to change the code to:

var newDocFrag = originalFunction.call(document),

I'm using knockout version 3.4.0

Regards,
MS

@mmcs85 mmcs85 changed the title IE Compatability View error on createDocumentFragment "originalFunction()" IE Compatability View error on createDocumentFragment "originalFunction()"Compatability Jun 29, 2016
@mmcs85 mmcs85 changed the title IE Compatability View error on createDocumentFragment "originalFunction()"Compatability IE Compatability View error on createDocumentFragment "originalFunction()" Jun 29, 2016
@mbest
Copy link
Member

mbest commented Jul 7, 2016

Pull request in #2090

@mbest mbest closed this as completed Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants