xles / hyphenator

Automatically exported from code.google.com/p/hyphenator
GNU General Public License v3.0
0 stars 0 forks source link

documentLoaded not set if Hyphenator is loaded after page load is complete #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load hyphenator via JS, e.g. with yepnope.js
2. only load hyphenator once rest of page has finished loading
3. run hyphenator

What is the expected output? What do you see instead?
Text should be hyphenated. It is not.
run() checks documentLoaded, which is set with event listeners. But, in this 
case, the events have already fired and documentLoaded never gets set.

What version of the product are you using? On what operating system?
Hyphenator 4.0.0, Chrome 16.0.912.63/Mac OS 10.7.

Please provide any additional information below.
In my limited tests, can be fixed by changing line 2188 to:
  if (isBookmarklet || documentLoaded || document.readyState === 'complete' || document.readyState === 'interactive') {

Original issue reported on code.google.com by davenewtron on 19 Apr 2012 at 6:51

GoogleCodeExporter commented 9 years ago
sorry, duplicate of Issue 158, will continue discussion there

Original comment by davenewtron on 19 Apr 2012 at 7:15

GoogleCodeExporter commented 9 years ago

Original comment by mathiasn...@gmail.com on 29 Apr 2012 at 9:45