Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querySelector not working #507

Open
ChrisSG opened this issue May 26, 2015 · 0 comments
Open

querySelector not working #507

ChrisSG opened this issue May 26, 2015 · 0 comments

Comments

@ChrisSG
Copy link

ChrisSG commented May 26, 2015

Hi,

for me querySelector in App.js (line 166 and 223) does not work and thus the live-refresh in devmode is not woring. It returns null... I replaced it with a the following function:

App.prototype.selectElement = function (elementName, attribute, value){
  var items = document.getElementsByTagName(elementName);
  var element = null;
  for(var i = 0; i < items.length; i++) {
    if (items[i].getAttribute(attribute).indexOf(value) == 0) {
      element = items[i]
      break;
    }
  }
  return element;
};

Respectively calling:
166 return this.selectElement('script','src','/derby/' + this.name)
223 var styleElement = app.selectElement('style','data-filename',data.filename);

Regards,

Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant