UNPKG

five-bells-visualization

Version:
34 lines (32 loc) 926 B
/** * dat-gui JavaScript Controller Library * http://code.google.com/p/dat-gui * * Copyright 2011 Data Arts Team, Google Creative Lab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 */ define([], function() { return { load: function (url, doc) { doc = doc || document; var link = doc.createElement('link'); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = url; doc.getElementsByTagName('head')[0].appendChild(link); }, inject: function(css, doc) { doc = doc || document; var injected = document.createElement('style'); injected.type = 'text/css'; injected.innerHTML = css; doc.getElementsByTagName('head')[0].appendChild(injected); } } });