-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix: Check HTMLDocument constructor exists first for IE10 #5678
Conversation
@ajvincent can you verify this change does not kill XML document support please? i do not have time for it. |
@junghwan-park thanks ot be proactive with the fix |
Apologies for not responding yet: I have been rather busy myself. I have this ticket pinned in my browser to remind me to test it, but on the surface it looks fine. |
@asturur I have build @junghwan-park branch (https://github.com/junghwan-park/fabric.js/tree/fix-ie10-support) and it looks fine, so I will wait until this is merged. |
The proposed change does pass the editor.zip test I posted in #5530, but on second look at the patch included, I have a minor concern. Specifically, the code adds a top-level var DocumentConstructor. Think about namespace pollution, or just being nice to neighboring code in the same scope. If this block were enclosed in a self-executing function which then defined the necessary properties, I'd be fine with this. That said, be careful how much you enclose in such a function: Consider this a peanut-gallery code review: if @asturur wants to accept the patch as-is, or require a change similar to what I suggest, that is his decision. |
Your review is what i was looking for actually. I did not notice/remember the header wasn't wrapped in an anti-leak function wrapping, so that |
@junghwan-park sorry for the delay, can you look at the comment/discussion? thanks for opening this! |
@asturur I've changed |
Guys thanks for collaboration |
@asturur @ajvincent Thanks. |
i ll merge another pr and release 3.0.1 |
) * fix: Check HTMLDocument constructor exists first for IE10 (fixes: fabricjs#5677) * fix: Remove 'var' definition & use ternary operation
AS-IS
HTMLDocument
constructor is not exists in IE10.fabric.js
bundle file usingHTMLDocument
constructor for checkdocument
is instance of it.TO-BE
Document
constructor instead ofHTMLDocument
constructor ifHTMLDocument
is not exists in browser global variable.Resolution
HTMLDocument
exists first.Document
for checkdocument
is instance of it.ref: #5677