MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
Bug in Chrome Extension (setDOMElement) with possible solutions
Current time: 03-02-2021, 05:14 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in Chrome Extension (setDOMElement) with possible solutions
07-24-2013, 07:02 PM (This post was last modified: 07-24-2013 07:15 PM by cws.)
Post: #1
Bug in Chrome Extension (setDOMElement) with possible solutions
Webpagetest 2.11 contains a bug in chrome extension that prevents the setDOMElement command from working: The tab id isn't found and no event to search for the dom element is fired:

- In wpt.commands.CommandRunner.prototype.doSetDOMElements (file commands.js) is checked if g_tabid is set before firing setDOMElements request).
- g_tabid is set via the constructor of CommandRunner (wpt.commands.CommandRunner in commands.js)
- Method wpt.commands.CommandRunner.prototype.doSetDOMElements isn't called by an instance of CommandRunner (it's called directly at the event onBeforeNavigate in commands.js)
-> g_tabid isn't initalized because namespaces restrict its domain

Example Script:
setDOMElement id=location
Result (using Chrome):

Possible solution:
- Move definition of g_tabid (var g_tabid = 0) from background.js to command.js (above goog.require('wpt.logging'))
- Another solution would be creating an instance of CommandRunner before calling method wpt.commands.CommandRunner.prototype.doSetDOMElements
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Bug in Chrome Extension (setDOMElement) with possible solutions - cws - 07-24-2013 07:02 PM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)