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

JS Tracker: prevent IE 7 error #11668

Merged
merged 9 commits into from May 8, 2017
Merged

JS Tracker: prevent IE 7 error #11668

merged 9 commits into from May 8, 2017

Conversation

mattab
Copy link
Member

@mattab mattab commented May 8, 2017

Finishing proposed PR in #11610 by @knixeur

JSlint validation + Minified files

knixeur and others added 6 commits April 18, 2017 15:59
When using directly console !== undefined, older IE versions
throw an error as they're actually tring to access an undefined
value. Use globally supported typeof(console) !== 'undefined'.

Changed typeof(<var>) to typeof <var> as it's not a function

Thanks @sgiehl
@mattab mattab added this to the 3.0.4 milestone May 8, 2017
@mattab
Copy link
Member Author

mattab commented May 8, 2017

My changes seem to have caused a regression in the javascript test:

Executing tests in test suite JavascriptTests...

Test failed in module request: 'trackingContent' 

Error: logAllContentBlocksOnPage should detect correct number of content blocks 

Actual: 8 

Source:     at http://localhost/tests/javascript/assets/qunit.js:1041

    at http://localhost/tests/javascript/assets/qunit.js:1635

    at http://localhost/tests/javascript/:4462

    at http://localhost/tests/javascript/assets/qunit.js:807

    at http://localhost/tests/javascript/assets/qunit.js:894

    at process (http://localhost/tests/javascript/assets/qunit.js:610)

    at http://localhost/tests/javascript/assets/qunit.js:199

Test failed in module request: 'trackingContent' 

Error: logAllContentBlocksOnPage should log all content blocks 

Actual: [{"name":"My Ad 7","piece":"Unknown","target":"http://img7.example.com"},{"name":"http://www.example.com/path/xyz.jpg","piece":"http://www.example.com/path/xyz.jpg","target":"http://img6.example.com"},{"name":"My Ad 5","piece":"http://img5.example.com/path/xyz.jpg","target":"http://localhost/anylink5"},{"name":"My content 4","piece":"My content 4","target":"http://img4.example.com"},{"name":"/tests/javascript/img3-en.jpg","piece":"http://localhost/tests/javascript/img3-en.jpg","target":"http://img3.example.com"},{"name":"img.jpg","piece":"img.jpg","target":"http://img2.example.com"},{"name":"/tests/javascript/img1-en.jpg","piece":"http://localhost/tests/javascript/img1-en.jpg","target":""},{"name":"/tests/javascript/img1-en.jpg","piece":"http://localhost/tests/javascript/img1-en.jpg","target":""}] 

Expected: [] 

Source:     at http://localhost/tests/javascript/assets/qunit.js:1041

    at http://localhost/tests/javascript/assets/qunit.js:1635

    at http://localhost/tests/javascript/:4463

    at http://localhost/tests/javascript/assets/qunit.js:807

    at http://localhost/tests/javascript/assets/qunit.js:894

    at process (http://localhost/tests/javascript/assets/qunit.js:610)

    at http://localhost/tests/javascript/assets/qunit.js:199


So far I don't see why - maybe you have an idea @sgiehl ?

@mattab
Copy link
Member Author

mattab commented May 8, 2017

Think I found it actually

@mattab mattab merged commit d5b7c84 into 3.x-dev May 8, 2017
@mattab mattab deleted the knixeur-3.x-dev branch May 8, 2017 17:57
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.

None yet

2 participants