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

Use of CustomEvent constructor #77

Closed
jamesnicholls opened this issue Oct 12, 2015 · 6 comments
Closed

Use of CustomEvent constructor #77

jamesnicholls opened this issue Oct 12, 2015 · 6 comments
Labels
module Relates to an Origami module
Projects

Comments

@jamesnicholls
Copy link
Member

The o-tracking documentation suggests to use the cuts-the-mustard test from the Origami spec, i.e: 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window. However the o-tracking code base makes use of the CustomEvent constructor, which isn't supported in IE <= 11. This means IE 9, 10 and 11 would pass the cuts-the-mustard test but still be unable to execute the o-tracking code.

@AlbertoElias
Copy link
Contributor

It's polyfilled by the Polyfill Service, CustomEvent needs to be added to the origami.json in the required browserFeatures array

@jamesnicholls
Copy link
Member Author

I still think the documentation should explicitly state that CustomEvent is required and provide an appropriate ctm.

@AlbertoElias
Copy link
Contributor

the documentation for required APIs in an Origami module is in the origami.json. CTMs are the same for all modules, many of them use CustomEvent, and all of these require the polyfill service to serve those polyfill for browsers that need them. If you think the spec should be different with regard to the topic, it would be great to discuss it in the Origami meeting tomorrow :)

@jamesnicholls
Copy link
Member Author

I'm not in the office on Thursdays.

I didn't realise that products were required to serve polyfills from the
polyfill service, but re-reading the o-tracking documentation I can see it
mentions it. What happens if the polyfill service is unavailable?

On 14 October 2015 at 12:40, Alberto Elias notifications@github.com wrote:

the documentation for required APIs in an Origami module is in the
origami.json. CTMs are the same for all modules, many of them use
CustomEvent, and all of these require the polyfill service to serve those
polyfill for browsers that need them. If you think the spec should be
different with regard to the topic, it would be great to discuss it in the
Origami meeting tomorrow :)


Reply to this email directly or view it on GitHub
#77 (comment)
.


This email was sent by a company owned by Pearson plc, registered office at
80 Strand, London WC2R 0RL. Registered in England and Wales with company
number 53723.

@AlbertoElias
Copy link
Contributor

Well, like with everything, if a dependency breaks, then some things won't
work perfectly. But it is behind a CDN, and everything is cached, and we
haven't had any major issues and we do actively maintain it.


This email was sent by a company owned by Pearson plc, registered office at
80 Strand, London WC2R 0RL. Registered in England and Wales with company
number 53723.

@AlbertoElias
Copy link
Contributor

Also worth adding that it's already in ft.com and in Next where o-tracking
is also being used


This email was sent by a company owned by Pearson plc, registered office at
80 Strand, London WC2R 0RL. Registered in England and Wales with company
number 53723.

@chee chee added this to incoming in Origami ✨ Feb 1, 2020
Origami ✨ automation moved this from incoming to complete Mar 24, 2020
@JakeChampion JakeChampion added the module Relates to an Origami module label Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
module Relates to an Origami module
Projects
Origami ✨
  
Done
Development

No branches or pull requests

5 participants