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.

pretest.js 498B

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