Making Sense of Radiohead’s Nonsensical Copyright Dispute With Lana Del Rey
ByDee Lockett,
a senior editor on the Culture Pages at New York
Photo: Getty Images
In what’s threatening to become the next “Blurred Lines,” there’s a new hotly contested copyright dispute brewing that involves two powerful names in music, as well as one of the defining songs of the ’90s. Lana Del Rey revealed last weekend that Radiohead is suing her over similarities between her Lust for Life album closer “Get Free” and the band’s most-known hit, “Creep.” In her tweet, she accused Radiohead of coming after an astounding 100 percent of the song’s publishing rights after she said she had offered 40 percent, saying “their lawyers have been relentless,” with the possibility that the song could be removed from future physical copies of the album. Her response: “We will deal with it in court.”
Though Radiohead has yet to publicly strike back, their publisher Warner/Chappell issued a statement to Vulture on Radiohead’s behalf days later shooting down much of Del Rey’s claims. Though they confirmed copyright negotiations between the two camps have been ongoing since last August, they denied ever filing a formal lawsuit against Del Rey — implying that this was intended to be settled out of court — or that Radiohead had said they would accept nothing less than 100 percent of the song’s publishing.
With each party now telling opposing sides of the same story, it’s difficult to make heads or tails of what’s really at stake, if there’s legitimate fault, who’s bluffing here, and how such an infringement claim might play out in court. We spoke to Jeff Peretz, a copyright expert and professor at NYU’s Clive Davis Institute of Recorded Music, and Dan Bogosian, a musicologist, to find out if Radiohead might actually have a case and what’s fairly deserved if they do.
What is this dispute really about?
According to Radiohead’s publisher, the problem stems from what they believe is an obvious overlap between “Get Free” and “Creep,” to the extent that Lana’s song infringes on Radiohead’s copyright to “Creep.” This is their specific gripe and what they feel Radiohead is owed: “It’s clear that the verses of ‘Get Free’ use musical elements found in the verses of ‘Creep’ and we’ve requested that this be acknowledged in favour of all writers of ‘Creep,’” a spokesperson for Radiohead’s publisher says. Reps for Radiohead would not comment on who flagged the issue and initiated the complaint — Radiohead, or their publisher — but it’s now game on.
Are there actual similar “musical elements”?
There’s no way of knowing what Radiohead’s publisher means by “musical elements” unless they elaborate in public records, but Bogosian considers it to denote melody. Though Bogosian believes the verses of “Get Free” obviously crib the instantly recognizable chord progression from “Creep,” it’s a famous one written as I-III-IV-iv, and duplicated chord progressions are so common in music that they can’t be copyrighted. (He points to Sam Smith’s “Midnight Train” as another example of being just one chord off from“Creep.”) Neither can rhythm, which he agrees also bites “Creep.” The fault as it pertains to copyright law is melody, which is where Bogosian notices Del Rey gets in trouble.
“Get Free” is written in the key of B-flat and “Creep” is written in the key of G — a minor third, or three half-steps apart, he explains — which makes their mathematical starting point slightly different. But, on paper, almost all of their intervals are the same. “If you wrote a jazz lead sheet [written for melody] and put them in the same key, those sections would be almost identical,” he explains. “And the melody is what most people consider to be the song.” That melodic structure coupled with the similar-sounding chord progression and rhythm bring the resemblance even closer. “The entire verse is just Lana doing her lyrics over Radiohead’s ‘Creep.’ She holds the same notes as Thom Yorke for the same duration at the same points and it’s the same relative pitches,” he says. “The guitar part is played to a different rhythm, but if you boiled it to the same key, the actual fingering and notes the guitar is playing would be the same.”
So, did Del Rey steal from “Creep”?
Bogosian puts it this way: “She Lana Del Rey’d it up. But the verses of ‘Get Free’ sound more like Radiohead’s ‘Creep’ than Prince’s cover of ‘Creep.’ Prince plays it twice as fast and the melody is not the same song at all. The lyrics are. But Lana Del Rey took ‘Creep.’ If you tried to do a ’90s cover of ‘Get Free’ it would be ‘Creep.’”
Does it matter if it was a coincidence?
Though Del Rey maintains she was not inspired by “Creep,” according to Peretz, intent does not factor into copyright law. It dates back to a lawsuit involving George Harrison’s “My Sweet Lord” and the Chiffons’ “He’s So Fine,” which ended with Harrison found guilty of “subconsciously” stealing from the song though he hadn’t heard it at the time of writing. A more recent example of that ripple effect is Sam Smith agreeing to share royalties and songwriting credit with Tom Petty on “Stay With Me” when it appeared that song stole from “Won’t Back Down,” despite Smith claiming it wasn’t an influence. “That’s the danger of this litigious behavior. It doesn’t matter if she intended to plagiarize or not,” Peretz says. “It’s just: Did she land on the same notes on the same chords? At times, she does. And if we’re defining that as copyright infringement, which we are, and she is now owing to put them on the copyright, then that’s what’s going to happen.” He adds, “As random as the whole thing is, the notes she chose on those particular chords resonate in a certain way. That’s what ‘Creep’ sounds like and that’s why this whole thing has happened.”
Who are “all” the writers of “Creep”?
Ironically, Radiohead was sued for copyright infringement on “Creep” when the Hollies claimed that it stole from their 1974 song “The Air I Breathe.” Songwriters Albert Hammond and Mike Hazelwood later received an undisclosed percentage of the publishing rights and royalties in an out-of-court settlement, and are credited as co-writers on the song to this day. Peretz believes that when Hammond and Hazelwood became co-publishers of “Creep,” there was likely a clause in the settlement stating that any future legal dealings regarding “Creep” would include them. He imagines both Hammond and the estate of Hazelwood, who died in 2001, would likely be onboard with the Del Rey dispute, as they stand to financially gain from it should Radiohead, Hammond, and Hazelwood get shared credit on “Get Free.” Radiohead’s publisher’s statement indicates that that’s the desired outcome.
How rare is to ask for 100 percent of the publishing?
Bottom line: very. “That sounds like made-up bullshit,” Peretz says. “They can’t demand 100 percent ownership of a song they didn’t write.” Though rare, there is precedent: In 1997, the Rolling Stones’ manager Allen Klein sued the Verve over a “symphonic version” of “The Last Time” sampled in “Bittersweet Symphony.” While the Verve had agreed to offer 50 percent of the royalties to license five notes of that version, Klein claimed they used more than what was agreed, therefore voiding the contract and leading to the lawsuit. In the end, the Verve were forced to forfeit 100 percent of the royalties and publishing to Mick Jagger and Keith Richards; to this day, the Verve never see a dime from their own hit and have no control over its use.
“Whether you want to say they took the music for ‘Bittersweet Symphony’ or not, they wrote the lyrics,” Bogosian says. “You think they’d get half. But no, for whatever reason, the jury or judge rewarded 100 percent to the Rolling Stones.” He adds, “Maybe that’s why Radiohead or their publisher want to litigate.” Peretz questions the validity of Del Rey’s 100 percent claim, given how historically rare it has been for a musician to demand that much leverage over their peer’s work, suggesting that there may have been some smoke and mirrors in her tweet as a strategy to negotiate the percentage down in future settlement talks. He notes, “One-hundred percent? I can’t imagine a jury would ever say, ’This song is now owned by Radiohead.”
Do Radiohead deserve 100 percent?
Not a chance. According to Peretz, because there are three sections to each of the songs, but only one of them (the verses on “Get Free”) has similarities to “Creep,” Radiohead should only be rewarded by that one-third math. “Even if this went to court and there was found to be some sort of an infringement, there’d be a settlement and Radiohead would be added to the copyright,” he says. “But they would never own the song outright 100 percent.” By Bogosian’s educated guess, roughly 60 percent of “Get Free” is Lana’s original work. For that reason, he finds her claim of having offered 40 percent of the publishing rights an accurate and fair amount. “If I were the judge, jury, or called to court as a musicologist, I would literally time the verses of the songs and then give Radiohead that percentage over the whole song,” he says. “I don’t want to see Lana destroyed over something so stupid when she did clearly write other parts of the song.”
What makes this different from the “Blurred Lines” case?
Much of the “Blurred Lines” lawsuit, in which a jury determined that Robin Thicke and Pharrell stole from Marvin Gaye’s “Got to Give It Up,” boiled down to copying what was described as the “vibe” or “feel” of Gaye’s original. With Lana and Radiohead, it’s a reverse situation where the sonic “vibe” of each song doesn’t match but the math does. “‘Blurred Lines’ had almost nothing in common with Marvin Gaye’s song, in terms of music theory. Everything about it in an ethereal sense pointed to Gaye, but everything in a literal, conceptual sense didn’t. [Pharrell] put enough spin on it so that there were no scientific similarities,” Bogosian explains. “But you wouldn’t listen to ‘Get Free’ and think Lana stole the production techniques of Radiohead because it doesn’t sound like a Pablo Honey song. But then in a music theory sense, it’s as similar as you can get.”
Why do Radiohead even care about “Get Free”?
Bogosian and Peretz both agree that Radiohead taking umbrage with “Get Free” is curious, given that the song is a little-heard deep cut that closes her last album and hasn’t been released as a single. Most copyright cases involve hit songs raking in millions, like “Blurred Lines” and “Uptown Funk,” so why this particular hill to die on? Peretz speculates that Del Rey preemptively publicizing the news prior to Radiohead’s filing might have tactfully pointed out that very inconsistency while also using it to her advantage: “That may be a reason why Lana’s camp would put out this information that Radiohead are asking for 100 percent. It’s almost hyperbolic to come out with that kind of a statement. It promotes the song.” He adds that the dispute will ultimately be a win for both sides, regardless of the outcome. “In hindsight, this is going to turn out to be a brilliant move. Everybody’s talking about it and streaming these songs.”
What’s the next step?
Because each party appears to want different things — Radiohead seemed fine with private negotiations, while Del Rey now wants to leave it up to the courts — it’s difficult to know if this dispute will head to litigation and a full-on trial. For the sake of camaraderie in music, Peretz hopes it doesn’t come to that. “I don’t think either of these artists stand to benefit from this thing winding up in a court of law. Right now they’re putting words in each other’s mouth that doesn’t make much sense,” he says. “Eventually we’ll see a settlement and I think they’ll find a way to meet in the middle.”
The very news of the case, regardless of whether it leads to any repercussions, could add to the growing industrywide confusion post–“Blurred Lines” over how to navigate creative similarities that fall in gray areas, and even those that are less ambiguous. “Worst-case scenario: We end up with some kind of ‘Blurred Lines’ bullshit where they award a ridiculous amount of money for a song that never even really made that much money,” Peretz says. “There’s always the question: What’s thievery and what’s homage? What’s borrowing and what’s influence? There are all these ways that music can be ‘copied.’”
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(12),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(1),appendLandingPageParams=require(135),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),auth.isSubscriber()&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"1":1,"4":4,"12":12,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(406),Fingerprint2=require(408),DS=require(407),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(406),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"406":406,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = '';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]