You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
454 B

  1. 'use strict'
  2. function get(uri) {
  3. var xhr = new XMLHttpRequest()
  4. xhr.open('GET', uri, false)
  5. xhr.send()
  6. if(xhr.status !== 200)
  7. console.error('SVG.js fixture could not be loaded. Tests will fail.')
  8. return xhr.responseText
  9. }
  10. function main() {
  11. var style = document.createElement("style")
  12. document.head.appendChild(style)
  13. style.sheet.insertRule( get('/fixtures/fixture.css'), 0 )
  14. document.body.innerHTML = get('/fixtures/fixture.svg')
  15. }
  16. main()