Skip to content

__synthTest() fails in Firefox - #29

Closed
andrewnicols wants to merge 1 commit into
bitovi:masterfrom
andrewnicols:synthTest29
Closed

andrewnicols wants to merge 1 commit into
bitovi:masterfrom
andrewnicols:synthTest29

Conversation

@andrewnicols

Copy link
Copy Markdown
Contributor

In Firefox 27.0.1 (latest stable), the linkHrefJS test fails with a warning that __synthTest is not a function.

This seems to happen because by the time the link click is simulated, the function has been overwritten with the original __synthTest function (which defaults to undefined).

Wrapping the window.__synthTest = oldSynth in a function seems to address this issue.

andrewnicols added a commit to andrewnicols/syn that referenced this pull request Feb 20, 2014
@matthewp matthewp added this to the v0.0.3 milestone Feb 20, 2014
@matthewp

Copy link
Copy Markdown
Contributor

Which version of Firefox are you testing in? In 30.0a1 I'm now getting:

ReferenceError: Syn is not defined
Source:     

javascript:Syn.support.linkHrefJSTest():1

@andrewnicols

Copy link
Copy Markdown
Contributor Author

I'm using 27.0.1 which is the latest stable.
I notice that this fails unit tests, but it actually works in a page. You know the project better so probably have a better idea for a fix. I guess this could be closure related.

Andrew

matthewp added a commit to matthewp/syn that referenced this pull request Feb 21, 2014
This reworks feature detection just a little bit to move the code into
their own modules so they can be seperately tested.

Fixes bitovi#30 by moving the feature detection to take place at the beginning
of the document instead of the end.

Fixes bitovi#29 by waiting until Syn is finished loading before removing
window.__synthTest. This is interesting bug, it appears (which I cannot
    track down definitively) that the issue is that Firefox isn't firing
the `javascript:__synthTest()` until after the elements have been
removed from the page.
matthewp added a commit to matthewp/syn that referenced this pull request Feb 22, 2014
This reworks feature detection just a little bit to move the code into
their own modules so they can be seperately tested.

Fixes bitovi#30 by moving the feature detection to take place at the beginning
of the document instead of the end.

Fixes bitovi#29 by waiting until Syn is finished loading before removing
window.__synthTest. This is interesting bug, it appears (which I cannot
    track down definitively) that the issue is that Firefox isn't firing
the `javascript:__synthTest()` until after the elements have been
removed from the page.
@matthewp matthewp closed this in d77084b Mar 3, 2014
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

Successfully merging this pull request may close these issues.

2 participants